No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Hello all, I'm trying to parse a file, but for some reason, getline is combining my two letter words with other words. Here is the portion of code I'm working with: [B]note[/B]: my program will always ignore the first word in a line [CODE] char line[256]; string word; char *line2=new … | |
Hello all, Let's say I have a vector like so: [CODE]vector < char *>rlist;[/CODE] and [CODE]char* word;[/CODE] Let's say char* word was pointing to a 9 character word, like "statement". If I were to do [CODE]rlist.push_back(word)[/CODE] I would get a seg fault. I believe this is because push_back expects a … | |
Hello all, I have a small question here. Let's say I want to tokenize a string(or multiple strings) from input. For example, my input file has the following: 1 2 3 And this is my tokenizing code: [CODE] char line[256]; vector < char *>tokenize(FILE * in) { vector <char*>tlist; char* … |