hello all I have written a program for a homework assignment, My code compiles without errors but I am absolutely stumped on a C string to string conversion:
I need to handle the string as a cstring and as a string, so I will have two outputs one for the cstring and one for the string.
In my code I opted to start this way: here's my snippet:
any suggestions on resources or references that can help me solve my problem would be great.Code:int main() { char cString[200]; string stdString; //here I was declaring stdString for my conversion but I can't get the syntax right //Get Input cout << "Please enter a string: "; cin.getline(cString, 200); cout << "You entered: " << cString << endl; cout << endl;