I'm still relatively new to C++ so could you explain what you mean using a vector?
Type: Posts; User: FDHannibal
I'm still relatively new to C++ so could you explain what you mean using a vector?
The data is coming from a .dat file. I dont know how many lines there are to read from.
The in would do the same thing wouldn't? Would it skip over the spaces and move to the number after the name?...
I need to read a data file that has the following structure
name number number number number number
I think I understand how the struct thing works. However all the examples...
Thank you so much, that fixed everything!
I'm trying to compare if a string is the same forwards as backwards (for example bob is the same backwards as forwards etc)
I managed to get the string to reverse and store the reverse string in...
Nevermind I fixed it!
Thanks for the replies, I did end up getting it to work.
However now its gone to crazy on me.
#include <iostream>
#include <string>
#include <fstream>
#include <cctype>
using namespace...
I'm trying to take a string and take out any character that isnt a letter so all that is left is the letters with no spaces.
string line, nospc, nodigit;
int j = 0;
line = "jggg665 ...
I figured out another way to do it and it worked like a charm.
Thanks for your help!
Ok so I changed all my char variables to string types. The compiler comes up with an error talking about implicit conversion. I really have no idea how to fix it. Is there some other way to go about...
Ok I'm very frusterated as this code isnt working right.
#include <iostream>
#include <iomanip>
using namespace std;
int main()