nothing
01-21-2004, 03:12 PM
#include <iostream>
using std::cout;
using std::endl;
#include <string>
using std::string;
int main()
{
string name = ("nothing 11.50");
string salary;
salary = name.substr(30, EOF);
cout << salary << endl;
return 0;
}
A name and the salary corresponding to that name will be stored on the same line in my database. There will always be thirty blank characters between the name and the salary, counting from the first letter of the name to the first number of the salary. Is this how you would do it to get the salary for a determined name? Thanks :t
using std::cout;
using std::endl;
#include <string>
using std::string;
int main()
{
string name = ("nothing 11.50");
string salary;
salary = name.substr(30, EOF);
cout << salary << endl;
return 0;
}
A name and the salary corresponding to that name will be stored on the same line in my database. There will always be thirty blank characters between the name and the salary, counting from the first letter of the name to the first number of the salary. Is this how you would do it to get the salary for a determined name? Thanks :t