Thank you!!!So in my other files i just put in the header and go straight to the coding?like this:
#include <iostream>
{
std::cout <<"Hi!\n";
return 0;
}
Edited by - StoNeD_TrOLL on January 12, 2002 12:53:31 PM
wtf???
No. You make another function, like -
Remember to use function prototypes. Have you read any books/tutorials on C++ yet?
------------------------------
Simple DirectMedia Layer:
Main Site - (www.libsdl.org)
Cone3D Tutorials- (cone3D.gamedev.net)
GameDev.net''s Tutorials - (Here)
OpenGL:
Main Site - (www.opengl.org)
NeHe Tutorials - (nehe.gamedev.net)
Online Books - (Red Book) (Blue Book)
int PrintHi(){ std::cout <<"Hi!\n"; return 0;}
Remember to use function prototypes. Have you read any books/tutorials on C++ yet?
------------------------------
Simple DirectMedia Layer:
Main Site - (www.libsdl.org)
Cone3D Tutorials- (cone3D.gamedev.net)
GameDev.net''s Tutorials - (Here)
OpenGL:
Main Site - (www.opengl.org)
NeHe Tutorials - (nehe.gamedev.net)
Online Books - (Red Book) (Blue Book)
------------------------------Put THAT in your smoke and pipe it
No, you create functions with names other than main.
int myReallyCoolUsefulFunction(void)
{
std::cout << "Hi!\n";
return 0;
}
Edit: Crap! You beat me to it...
Edited by - Martee on January 12, 2002 1:02:27 PM
int myReallyCoolUsefulFunction(void)
{
std::cout << "Hi!\n";
return 0;
}
Edit: Crap! You beat me to it...
Edited by - Martee on January 12, 2002 1:02:27 PM
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
Sorry.
Stoned Troll, you should check out the book ''sams teach yourself c++ in 21 days.'' It''s a really great book; you''ll learn alot from it.
------------------------------
Simple DirectMedia Layer:
Main Site - (www.libsdl.org)
Cone3D Tutorials- (cone3D.gamedev.net)
GameDev.net''s Tutorials - (Here)
OpenGL:
Main Site - (www.opengl.org)
NeHe Tutorials - (nehe.gamedev.net)
Online Books - (Red Book) (Blue Book)
Stoned Troll, you should check out the book ''sams teach yourself c++ in 21 days.'' It''s a really great book; you''ll learn alot from it.
------------------------------
Simple DirectMedia Layer:
Main Site - (www.libsdl.org)
Cone3D Tutorials- (cone3D.gamedev.net)
GameDev.net''s Tutorials - (Here)
OpenGL:
Main Site - (www.opengl.org)
NeHe Tutorials - (nehe.gamedev.net)
Online Books - (Red Book) (Blue Book)
------------------------------Put THAT in your smoke and pipe it
Im reading a c++in twenty four hours.And Drizzt,when i do your code my complier gives me this:
Error : undefined identifier 'std'
bkla.cpp line 3 std:: cout <<"Hi!\n";
Edited by - StoNeD_TrOLL on January 12, 2002 1:07:55 PM
Error : undefined identifier 'std'
bkla.cpp line 3 std:: cout <<"Hi!\n";
Edited by - StoNeD_TrOLL on January 12, 2002 1:07:55 PM
cout is unidentified to my complier if i dont put"std::"...................none of this is working.
Edited by - StoNeD_TrOLL on January 12, 2002 4:41:08 PM
Edited by - StoNeD_TrOLL on January 12, 2002 4:41:08 PM
I think you need to #include <iostream.h> at the top of that file for cout to work.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement