i was just wondering how come there is no variable type (like int) that suppors words?
i am tyring to make a program that simply just responds to a user, but all my program is accepting is numbers.
what do i do?
yes i already tried google.
Posted 02 August 2005 - 11:03 AM
Posted 02 August 2005 - 02:57 PM
Posted 02 August 2005 - 03:51 PM
#include <string>
#include <iostream>
using namespace std;
int main()
{
string bob = "Hello, im a string\n";
cout << bob;
return 0;
}#include <iostream.h>
int main()
{
char *mychar; // this is a pointer
mychar = "Hello";
cout << "mychar has the value of: " << mychar << "\n" << "and the address in memory of: " << &mychar << "\n";
return 0;
}