View Full Version: Im not very good...

All Mod GMC > C++ > Im not very good...



Title: Im not very good...


rig - April 13, 2007 11:01 PM (GMT)
First, is I know almost nothing about c++, and could anyone tell me how to properly make strings? (if you can o_O) Also a way to make it use something other than "dos" or "cmd" or whatever you might call it?

ari_aaron - April 17, 2007 01:30 AM (GMT)
Windows programs in C++ are really hard to make.

I found this tutorial to be good:

http://www.relisoft.com/win32/index.htm

Big J - May 5, 2007 07:13 AM (GMT)
For strings in C++, here's an example:

CODE
#include <iostream> //cout, cin
#include <conio.h> //_getch()
#include <string> //this is for strings
using namespace std;

int main(){
   string name; //declare a string
   cout << "What is your name?\n";
   cin >> name;
   cout << "Hello " << name << ".\n"
        << "Press any key to continue...";
   return _getch();
}//end main


If you're looking to make Windows programs, it will be easier in Java.

rig - May 10, 2007 12:55 AM (GMT)
It says it doesnt recognize 'string'. I cant get you the exact error right now. Anyways I've been learning java and am really good right now, so I might just stop trying to learn c++.

Big J - May 10, 2007 12:57 AM (GMT)
You need to include the string header!
CODE
#include <string>




Hosted for free by InvisionFree