Jump to content

Recommended Posts

Posted

My teacher always told me to add string for some reason >.>.... I remember in the first day of school last year my teacher said to always add iostream and string in all my C++ programs

  • Replies 49
  • Created
  • Last Reply

Top Posters In This Topic

Posted

I'd say he was correct cause I once declared a string variable and I got all kinds of errors cause I forgot to include the library ':lol:

 

oh well...that all changes in managed c++

Posted (edited)

I have high goals this year in my school... the highest being the contest in orlando for 1-2 year programmers, I plan on winning first (it's in vb and c++ no java)

 

Edit: On a side note, I'm slowly starting to get the same thrill I get from competing in video games onto competing with my school members

Edited by Drake
Posted
I have high goals this year in my school... the highest being the contest in orlando for 1-2 year programmers, I plan on winning first (it's in vb and c++ no java)

 

Edit: On a side note, I'm slowly starting to get the same thrill I get from competing in video games onto competing with my school members

good luck I guess

 

btw, are you sure it's not a contest where visual c++ is used? :blink:

Posted

i knew Drake was smarter than me, i just knew it and i just found out. How dumb of me. hehe

Posted

Wow, Drake has a hidden talent. That piece of code was nice, and I would have included to begin with.

Posted
#include <iostream>
#include <string>
using namespace std;

int main()
{
   str MemberName;
   
   cout << "Enter the name of a member at 1emu\n ";
   cin >> MemberName;
   if (MemberName = 'Ryuken' || 'Axl')
   {
       cout << "stfu and go away you damn narutard! ";
       return 0;
    }
   else
       cout << "hi, have a nice day ";

   return 0;
}

Posted (edited)

Haha weirdy, that's nice, and yes i'm positive the contest is visual C++, I just finished my vb program...boring :blink:'

 

Edit: Weirdy put char not str, use " not '...... besides that it works fine :P, unless ryuken and axl know that c++ is case sensitive >.>

Edited by Drake
Posted
Haha weirdy, that's nice, and yes i'm positive the contest is visual C++, I just finished my vb program...boring :P'

 

Edit: Weirdy put char not str, use " not '...... besides that it works fine :P, unless ryuken and axl know that c++ is case sensitive >.>

str is a string variable

 

which is why <string> is included

 

I though you knew that :blink:

Posted

I just ran the program in my computer class, str gave me an error I had to change it to string for it to work

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...