VC++ Compiler Problems
I wrote a simple program that basically displayed a line of text using cout and then got user input with getch.
I've had several people look at my code and they say it should work fine, but when I compile, it displays nothing. If you hold down a button, it will wait a little bit and then display the text about 11 times. Is that a problem with my compiler or what?
** And also for some reason, I never have to put using namespace std... or anything related to it. When I do it generates an error. What do I fo to change that?
[edited by - SirGorthon on August 12, 2002 10:29:12 PM]
There are some things that may be affecting the output of your program.
First thing is what type of project are you creating? a win32 app, console app, or what?
are you including the correct headers?
is your linker including the correct libraries in order?
I''m sure there are other things that contribute to this so if you could give just a bit more information it may help.
commando_337
First thing is what type of project are you creating? a win32 app, console app, or what?
are you including the correct headers?
is your linker including the correct libraries in order?
I''m sure there are other things that contribute to this so if you could give just a bit more information it may help.
commando_337
Uhh.. This is a console app.
All the headers are OK.
I dunno how to check the linker thing.
**I'm new... so I might be slow.
[edited by - SirGorthon on August 12, 2002 10:41:32 PM]
All the headers are OK.
I dunno how to check the linker thing.
**I'm new... so I might be slow.
[edited by - SirGorthon on August 12, 2002 10:41:32 PM]
If you are using <iostream.h> stop right now and use <iostream>.
Check your favorite C++ reference to know why. If it doesn''t explain, get a better reference.
Documents [ GDNet | MSDN | STL | OpenGL | Formats | RTFM | Asking Smart Questions ]
C++ Stuff [ MinGW | Loki | SDL | Boost. | STLport | FLTK | ACCU Recommended Books ]
Check your favorite C++ reference to know why. If it doesn''t explain, get a better reference.
Documents [ GDNet | MSDN | STL | OpenGL | Formats | RTFM | Asking Smart Questions ]
C++ Stuff [ MinGW | Loki | SDL | Boost. | STLport | FLTK | ACCU Recommended Books ]
Huh? I've been using < iostream.h > (minues the spaces) What's the difference?
O_O DUDE! THANK YOU SO MUCH! I GOT IT TO WORK NOW! AND I ALSO HAFTA PUT using namespace std; NOW! I'm happy. ^_^
[edited by - SirGorthon on August 12, 2002 11:05:58 PM]
O_O DUDE! THANK YOU SO MUCH! I GOT IT TO WORK NOW! AND I ALSO HAFTA PUT using namespace std; NOW! I'm happy. ^_^
[edited by - SirGorthon on August 12, 2002 11:05:58 PM]
iostream.h, fstream.h, strstream are deprecated prestandard headers to which you must substitute iostream, fstream and sstream respectively.
Documents [ GDNet | MSDN | STL | OpenGL | Formats | RTFM | Asking Smart Questions ]
C++ Stuff [ MinGW | Loki | SDL | Boost. | STLport | FLTK | ACCU Recommended Books ]
Documents [ GDNet | MSDN | STL | OpenGL | Formats | RTFM | Asking Smart Questions ]
C++ Stuff [ MinGW | Loki | SDL | Boost. | STLport | FLTK | ACCU Recommended Books ]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement