Welcome Guest [Log In] [Register]



Add Reply
Im not very good...
Topic Started: Apr 13 2007, 06:01 PM (130 Views)
rig
1a5a6a4
Administrators
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?
Posted Image
Offline Profile Quote Post Goto Top
 
ari_aaron
Member Avatar
1a4
Root Administrator
Windows programs in C++ are really hard to make.

I found this tutorial to be good:

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

My msn: Posted Image
Posted Image
If anyone wants GMail or Windows Live Messenger invites, PM me!
Offline Profile Quote Post Goto Top
 
Big J
Member Avatar
2

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.
I create and modify my own code... I'm advanced AI!
Big J's Domain
I am an Posted Image in the GM Quiz!
Listen to what the robot has to say... CLICK HERE.
(Macromedia Flash Player 8 required)
GM7 Posted Image is now available!
Super Mario Pong v2.0
Offline Profile Quote Post Goto Top
 
rig
1a5a6a4
Administrators
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++.
Posted Image
Offline Profile Quote Post Goto Top
 
Big J
Member Avatar
2

You need to include the string header!
Code:
 
#include <string>
I create and modify my own code... I'm advanced AI!
Big J's Domain
I am an Posted Image in the GM Quiz!
Listen to what the robot has to say... CLICK HERE.
(Macromedia Flash Player 8 required)
GM7 Posted Image is now available!
Super Mario Pong v2.0
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · C++ · Next Topic »
Add Reply


Theme designed by Sith of Outline