| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Comments:
<0> no <1> haha <0> mmm, c99 might? <0> bool running = true; while( running ){ ... blah blah blah... case WM_DESTROY: running = false; ... <0> i suspect it doesn't, though <2> ok it didnt work <0> valian probably because you made the exact same mistake <1> #define TRUE oh yeah :) <0> valian lets see your code again to see how badly you interpreted what we said <2> the case WM_DESTROY did trigger, the bool was changed from false to true <2> but still when i check the value in another file its still false <0> in another file? <0> how do you "check the value in another file" ? <2> case WM_DESTROY: <2> toKill=true; <1> NULL == false?
<0> NULL is usually defined as 0, in C++ <2> in the other file after its set to true: <2> if (toKill) <2> break; <2> but when i use breakpoint, the toKill which was true is false again <0> valian come on... show us the whole file <0> paste them on the paste site <0> or use the debugger and step through the code <2> is this right <2> extern bool toKill=false; <2> this is in the file.h <2> which is included in both .cpp files <0> I think I would put the initialization at the definition <2> i tried that but it said unresolved external <0> well, if you would SHOW US THE FILES we probably could tell you why <3> hi everybody <0> tonsofpcs I hope you aren't trying to sell anything <3> lol <3> rdragon - if i were, I would have done so and ran already :-p <0> hehe <3> I can't part with any of my PCs, they all work and i'm a crazy collector :) <3> (well the one //c is dead, but that's just a //c, I got 2 of em) <0> //c ? <3> anyway, anyone have any clue how in C++ (not MSVCC or BCC proprietary) I can input a single character <3> rdragon - yes, it commented itself out of existance ;) <4> cin.get(); <0> char ch; cin >> ch; <0> or cin.get(), yeah <3> those all wait for cr/lf/crlf afaict <4> ah, you want an instant response <4> you can't do that in ISO C++ <4> you have to use a platform extension <3> bah, know of a way to do it in ANSI C? <4> nope, since C++ encomp***es the standard C library, if you could do it in C you could do it in C++ <3> i wonder if ASM could handle it... <5> nope <4> I wouldn't bother using ***embly to try it <5> You must use the win32 api <5> You can't call bios interrupts in windows <3> debugger - that's a bit hard to do when I'm not running win32. <5> ahhh <4> if it's on windows, of course <5> e any clue how in C++ (not MSVCC or BCC proprietary) : you said <0> just find an input library, or something like ncurses <3> lol, i need to simulate a windows pause function somehow (linux), without calling wine <0> why? <3> rdragon - to appease the c++ instructor who insists that system("pause") is standard <0> meh <3> my sentiments exactly, but i want an A ;) <0> don't worry about what your dumb professor thinks <6> pause.cpp: #include <iostream> #include <climits> int main() { std::cout << "Press ENTER to continue.\n"; std::cin.ignore( INT_MAX, '\n' ); } <6> g++ pause.cpp -o pause :P <4> system() is a portable way to write non-portable code <3> I guess i'll have to do the wait for enter thing ;) thanks for the quick source Kniht :) <3> cn28h - yes, it is. <2> no one use extern it has a bug and doesnt update both files <0> valian you're full of **** <4> haha what? <4> that' doesn't make sense <4> how can a language keyword have a bug? <6> cn28h: export :P
<5> the bug is in his head ;) <4> well, I have to admit I don't know what export is ;P <0> valian when are you going to show us your code so we can fix it in 2 seconds? <5> Or... the problem is between the chair and the monitor <2> i=1;(i==0)==true; <0> what in the hell is that? <6> a bad attempt at ascii art <4> haha, second statement is legal but has no effect <2> set i = 1 but its still 0 <0> valian you're being difficult <6> no, it's equal to 1 <0> show us your goddamn code <0> paste it all on the paste site <3> it's an Aye Dee Ten Tee error, Description: Short circuit between the chair and the keyboard.. <6> void f() { int i = 1; if ( i == 1 ) { std::cout << "one"; } else { std::cout << "something else"; } } <5> Let's try reverse psychology,"Do NOT paste the code on the paste site!" <0> don't do that, he might explode <0> valian if you don't want our help then don't bother us with your problems <0> hmm, over the past few weeks i've been getting sudden feelings of rage <3> rdragon - if he explodes, his problem might be solved. <3> rdragon - that's what the kick button is for ;) <0> unrelated to being here I think, just in general <0> not a great feeling, heh <2> ok i posted it but im sure its a bug in extern <0> valian you're still full of **** <0> where's the definition? <2> on line 50 its still false after line 24 set it to true <0> I thought you said you did it exactly as I showed earlier <0> you liar <3> ValDoDo - CaSe check? <2> the definition is in n2tested.h: <3> valian rather <0> valian then why didn't you paste that too? <0> er, nevermind <2> its right at the top <0> don't initialize it there <2> line 3 <0> [02:11] <@rdragon> one.h: extern bool i; one.cpp: #include "one.h" bool i = false; void f(){ i = true } two.cpp: #include "one.h" void g(){ i = false; } <0> now, re-read that and compare it to what you've got <0> and maybe you can forget about your little 'theory' of there being a 'bug in extern' <2> what is the bool i = false; in one.cpp <0> that's the definition <2> why is it not in two.cpp <0> because then there would be multiple definitions of i <3> anyone know of a place i can download an ISO C++ reference (so I don't need to carry a book around)? <6> extern = How to declare a variable in one file and use it in another: <http://www.gnomesane.net/code/extern/> <3> [html in an archive preferred] <6> ref = Some C++ Reference Sources: (1) Your compiler documentation (2) http://www.dinkumware.com/manuals/reader.aspx?lib=cpp (3) http://msdn.microsoft.com/library/en-us/vcstdlib/html/vcoriStandardCLibraryReference.asp?frame=true (4) http://www.sgi.com/tech/stl/ (5) http://www.cppreference.com (*) http://www.google.com <0> http://www.rudbek.com/books.html <6> standard = ISO and ANSI have both approved the C++ standard. The .pdf can be purchased and downloaded from http://webstore.ansi.org/ansidocstore/product.asp?sku=INCITS%2FISO%2FIEC+14882%2D2003 <3> thanks <2> without bool i = false; it says unresolved external <2> why its so hard to make a global variable <0> it's not, you just can't follow instructions <7> morning tma <7> tam <8> help!! <8> can everyone write a c program for me??? <8> hey!! <8> People in this channel are nothing but Big BULL****S!!! DEAF-BULL****S!!!! ****!!!!! <8> BLIND CRAVINGS!! <7> vin`ker: why dont you just go away, and read your book <9> heh <9> how dare he ask us to write him a c program? <9> doesn't he know this is #c++? <7> yeah <10> if one wanted to hypothetically design a peice of software to automatically play online poker sites, what language would be the most approporiate to use? <7> hm, prolog/python/ruby <11> ***embly <11> definately <12> calc definately <6> definately = It's spelled "definitely"! Go get yourself a dictionary! <9> zztopless: qbasic <11> meh
Return to
#c++ or Go to some related
logs:
#linuxhelp assembleur and $0xfffffff0,%esp kiereg MISSkitten los angeles #java #linux #mirc #MissKitten #linux #AllNiteCafe
|
|