B
baygross
I am taking an introduction to c++ at my school. We use the
Lawrenceville Press book and studio at my school. I just downloaded
Microsoft Visual Studio 2005 for experimenting away from school.
I am trying to write a function, (with Microsoft Visual Studio), to
turn a string into an integer. The LVP studio has a library, (whos
name a cant recall) that lets me turn a C++ string into a C string,
and then use atoi() to convert it to an integer. Visual Studio, as
far as i can tell, will not let me easily do this.
I have looked at the help file, but to no avail. The help file uses
characters to turn strings into intergers, and it confuses me. What is
the difference between:
string mystring="hello world" and char *mystring ="hello
world" ????
If anyone could give me a link or a simple explination to the
difference between these two types, and/or give me some help on
turning strings into integers, I would really appreciate it.
_BG
Lawrenceville Press book and studio at my school. I just downloaded
Microsoft Visual Studio 2005 for experimenting away from school.
I am trying to write a function, (with Microsoft Visual Studio), to
turn a string into an integer. The LVP studio has a library, (whos
name a cant recall) that lets me turn a C++ string into a C string,
and then use atoi() to convert it to an integer. Visual Studio, as
far as i can tell, will not let me easily do this.
I have looked at the help file, but to no avail. The help file uses
characters to turn strings into intergers, and it confuses me. What is
the difference between:
string mystring="hello world" and char *mystring ="hello
world" ????
If anyone could give me a link or a simple explination to the
difference between these two types, and/or give me some help on
turning strings into integers, I would really appreciate it.
_BG