I have to write a program using vectors that will input a list of positive
integers terminated by a negative integer and output the unique numbers in the list in ascending order? Can anyone help me get started?
Well, you can use the string functions to find each number.. example with comma-separated numbers, spaces not allowed:
std::string numbers; // this is the string with your numbers
std::string::size_type pos = 0;// current position
while(pos != std::string::npos) // as long as current position is valid
std::string::size_type start = pos; // temp storing pos in start
pos = numbers.find_first_of(',', start); // setting pos to the next pos, which is comma
v.push_back(atoi(numbers.substr(start, pos-start).c_str())); // cut from start to (next-comma-position minus current-position)
pos++; // skip next comma, so we should be positioned at the next number
I Developed application in C# with crystal reports and created setup file in third party (Advance) Installer.When i installed my application on client system application is working but ...