Post Reply help me with my c++ homework
5011 cr points
Send Message: Send PM GB Post
Offline
Posted 11/17/15
#include <iostream>

int main()
{
cout << "hi" << endl;
return 0;
}
i keep getting undeclared identifier
30 cr points
Send Message: Send PM GB Post
23 / M / USA
Offline
Posted 11/17/15
#include <iostream>
using namespace std;

int main()
{
cout << "hi" << endl;
return 0;
}

try that
30236 cr points
Send Message: Send PM GB Post
It doesn't matter.
Offline
Posted 11/18/15
C++? Why not "B" ?
10631 cr points
Send Message: Send PM GB Post
Rabbit Horse
Online
Posted 11/18/15 , edited 11/18/15
or just use a std:: if you don't want to use the standard namespace globally.

edit: depending on the environment you're using, the program will close almost as soon as it is launched (after a few nanoseconds)
to see the output, you might have to make the program pause, using something like

char a;
std::cin >> a;
585 cr points
Send Message: Send PM GB Post
22 / M
Offline
Posted 11/18/15
Haha.

What's going on.
You must be logged in to post.