long to string cpp
#include <iostream>
#include <sstream>
int main() {
long longValue = 123456789;
// Step 1: Create a stringstream object
std::stringstream ss;
// Step 2: Insert the long value into the stringstream
ss << longValue;
// Step 3: Extract the string representation of the long value
std::string stringValue = ss.str();
// Step 4: Output the result
std::cout << "Long to String: " << stringValue << std::endl;
return 0;
}