| View previous topic :: View next topic |
| Author |
Message |
tdenisenko Grandmaster Cheater
Reputation: 0
Joined: 23 Oct 2007 Posts: 799 Location: Turkey
|
Posted: Tue May 06, 2008 12:28 pm Post subject: [HELP] VC++ #include iostream.h ... |
|
|
i am learning C++ and i just made a basic script:
| Code: |
#include <iostream.h>
int main(){
cout << "Hello Everybody!\n";
return 0;
}
|
but i cant compile it because i dont know what iostream.h must include
can someone help?
_________________
Last edited by tdenisenko on Tue May 06, 2008 12:34 pm; edited 1 time in total |
|
| Back to top |
|
 |
b6ooy Grandmaster Cheater
Reputation: 0
Joined: 21 Sep 2006 Posts: 653
|
Posted: Tue May 06, 2008 12:30 pm Post subject: |
|
|
| no need for the .h just <iostream>
|
|
| Back to top |
|
 |
tdenisenko Grandmaster Cheater
Reputation: 0
Joined: 23 Oct 2007 Posts: 799 Location: Turkey
|
Posted: Tue May 06, 2008 12:37 pm Post subject: |
|
|
| b6ooy wrote: | | no need for the .h just <iostream> |
doesnt work:
error C2065: 'cout' : undeclared identifier
_________________
|
|
| Back to top |
|
 |
b6ooy Grandmaster Cheater
Reputation: 0
Joined: 21 Sep 2006 Posts: 653
|
Posted: Tue May 06, 2008 12:51 pm Post subject: |
|
|
iostream > std > cout
so add std::
This is very noobish , you better not start .
Last edited by b6ooy on Tue May 06, 2008 12:54 pm; edited 1 time in total |
|
| Back to top |
|
 |
HalfPrime Grandmaster Cheater
Reputation: 0
Joined: 12 Mar 2008 Posts: 532 Location: Right there...On your monitor
|
Posted: Tue May 06, 2008 12:53 pm Post subject: |
|
|
std::cout <<...
or
using namespace std; after the #includes
_________________
|
|
| Back to top |
|
 |
Stylo Grandmaster Cheater Supreme
Reputation: 3
Joined: 16 May 2007 Posts: 1073 Location: Israel
|
Posted: Tue May 06, 2008 12:53 pm Post subject: |
|
|
or you can just add using namespace std; after the #include <iostream>
_________________
Stylo |
|
| Back to top |
|
 |
HalfPrime Grandmaster Cheater
Reputation: 0
Joined: 12 Mar 2008 Posts: 532 Location: Right there...On your monitor
|
Posted: Tue May 06, 2008 12:56 pm Post subject: |
|
|
lol we all posted right after eachother
| Quote: | | This is very noobish , you better not start . |
What the fuck? He's just starting, lay off.
_________________
|
|
| Back to top |
|
 |
b6ooy Grandmaster Cheater
Reputation: 0
Joined: 21 Sep 2006 Posts: 653
|
Posted: Tue May 06, 2008 1:06 pm Post subject: |
|
|
| HalfPrime wrote: | lol we all posted right after eachother
| Quote: | | This is very noobish , you better not start . |
What the fuck? He's just starting, lay off. |
Someone who have made a trainer like in his forum signature should not come here post this kind of questions ( he wrote he made it , includes coding ).
I am right ?
leechers will never be able to learn , leeching is running in their blood .
|
|
| Back to top |
|
 |
tdenisenko Grandmaster Cheater
Reputation: 0
Joined: 23 Oct 2007 Posts: 799 Location: Turkey
|
Posted: Tue May 06, 2008 1:08 pm Post subject: |
|
|
i am really confused i am always getting same error
i wrote std::cout but:
fatal error C1083: Cannot open include file: 'iostream.h': No such file or directory
_________________
|
|
| Back to top |
|
 |
Stylo Grandmaster Cheater Supreme
Reputation: 3
Joined: 16 May 2007 Posts: 1073 Location: Israel
|
|
| Back to top |
|
 |
tdenisenko Grandmaster Cheater
Reputation: 0
Joined: 23 Oct 2007 Posts: 799 Location: Turkey
|
Posted: Tue May 06, 2008 1:35 pm Post subject: |
|
|
| 1qaz wrote: | but he's allowed to ask anything he want about programming
edit: tdenisenko dont use iostream.h !!! remove the .h just <iostrem>
and after that using namespace std; |
how can i use it?
sry for being a noob i just started learning
| Code: |
#include <iostream>
namespace std;
int main(){
cout << "Hello World!\n";
return 0;
}
|
=
| Code: |
error C2059: syntax error : ';'
error C2065: 'cout' : undeclared identifier
|
_________________
|
|
| Back to top |
|
 |
HalfPrime Grandmaster Cheater
Reputation: 0
Joined: 12 Mar 2008 Posts: 532 Location: Right there...On your monitor
|
Posted: Tue May 06, 2008 1:44 pm Post subject: |
|
|
"using namespace std;" OR "std::cout <<"
_________________
|
|
| Back to top |
|
 |
tdenisenko Grandmaster Cheater
Reputation: 0
Joined: 23 Oct 2007 Posts: 799 Location: Turkey
|
Posted: Tue May 06, 2008 1:47 pm Post subject: |
|
|
| HalfPrime wrote: | | "using namespace std;" OR "std::cout <<" |
can you type all the script pls?
because i fail again:
error C2857: '#include' statement specified with the /Yciostream.h command-line option was not found in the source file
_________________
|
|
| Back to top |
|
 |
Noz3001 I'm a spammer
Reputation: 26
Joined: 29 May 2006 Posts: 6220 Location: /dev/null
|
Posted: Tue May 06, 2008 2:07 pm Post subject: |
|
|
| Code: | #include <iostream>
using namespace std;
int main( void )
{
cout << "Hello Everybody!\n";
return 0;
} |
|
|
| Back to top |
|
 |
tdenisenko Grandmaster Cheater
Reputation: 0
Joined: 23 Oct 2007 Posts: 799 Location: Turkey
|
Posted: Tue May 06, 2008 2:45 pm Post subject: |
|
|
| noz3001 wrote: | | Code: | #include <iostream>
using namespace std;
int main( void )
{
cout << "Hello Everybody!\n";
return 0;
} |
|
i tried it already:
error C2857: '#include' statement specified with the /Yciostream.h command-line option was not found in the source file
_________________
|
|
| Back to top |
|
 |
|