May 22, 2013 at 11:34pm UTC
If you never used std what have you learned so far? I'm guessing
1 2 3 4 5 6 7
#include <iostream>
int main()
{
Hello world!
//why isn't it working?
}
Or you have learned std
1 2 3 4 5 6
#include <iostream>
int main()
{
std::cout << "Hello world!" << std::endl;
}
or if you go to school they like to teach us evil things like use global variables all the time because I am a lazy teacher
1 2 3 4 5 6 7
#include <iostream>
using namespace std;
int main()
{
cout << "Hello world!" << std::endl;
}
Btw this forum is to
HELP people
not GIVE people code.
Last edited on May 22, 2013 at 11:34pm UTC
May 22, 2013 at 11:35pm UTC
Other stuff that are less complex like cout << "Hello World" << endl;
May 22, 2013 at 11:37pm UTC
Some features of c++ are way more complex than they need to be.
May 22, 2013 at 11:39pm UTC
like?
std::algorithms == complex ? std::cout << "Yes" << std::endl : std::cout << "No" << std::endl;
Last edited on May 22, 2013 at 11:41pm UTC
May 22, 2013 at 11:42pm UTC
std::algorithms == complex ?,
cout << "Yes." << endl << "No." << endl
Are you going to help me or not?
May 22, 2013 at 11:51pm UTC
Please help me someone!!!
May 22, 2013 at 11:52pm UTC
What exactly is the problem? Does vlad's method not work?
May 22, 2013 at 11:53pm UTC
Yes there is like 6 errors. Try it.
May 23, 2013 at 12:01am UTC
How about you tell us what the errors are or try to fix them one at a time starting from the first to the last. Most of the time if you fix the first error the rest of them go away. Vlad mentioned that you put a semi-colon where a colon should have been did you try fixing that? He is right most of the time especially since he has been programming a lot longer than me
May 23, 2013 at 11:26am UTC
One of them is that it is missing a > on the last line. I did add in the semicolon.
May 23, 2013 at 3:29pm UTC
Please post your latest code here, in order that we can see where the problems are.
Last edited on May 23, 2013 at 3:29pm UTC
May 23, 2013 at 4:13pm UTC
std::ifstream in( "Save data.txt" );
if ( std:: find( std::istream_iterator<std::string>( in ),
std::istream_iterator<std::string>(),
( "orc" ) == std::istream_iterator<std::string>() ) >
{
orc();
}
May 23, 2013 at 7:08pm UTC
Sorry. I am using Dev-C++. Is that compiler dated?
May 23, 2013 at 7:14pm UTC
Thank you so much it is working.