hey what would a basic string program look like, can some one show me? what would I need to do to make the numbers the user inputs in, go into a string?

#include "stdafx.h"
#include <iostream>
#include <ctype.h>
#include <fstream>
#include <string>
using namespace std;
 
int reverseDigit, integer;
 
int main()
{
 cout <<"Please input an integer: " << endl;
 cin >> integer;
 cout << integer << endl;
 return 0;
}

The following is copied from the first google result for "c++ int to string":

Q. How do I convert from int to string?

A. Converting from int to string is a little more complicated than converting a string to int. There are no standard C++ functions for this, but there is a way to do it using standard stringstreams. The class stringstream is declared in header sstream and is used like this:

std::stringstream ss;
std::string str;
ss << 31337;
ss >> str;

The variable str now contains "31337"

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.