No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
16 Posted Topics
Re: A few different things I see offhand. Where do you have string declared/included? Also I would suggest looking into a case statement. I know its not much help offhand but it will make sense if you look at it :) Cameron | |
Re: You have to make it equal to something such as : [icode]int numberyouwant = updateCorrectTotal(position, points, totForward, totBack);[/icode] That should help. Cameron | |
Hello Everyone, My name is Cameron Battagler. I have been lurking around the C++ forms for the last three months and figured it would be a good time to introduce myself. I program way too much for my own good and hope to start helping more people around here with … | |
I am attempting to read in a comma delimited file and only take in the first three values. At the moment the code I have obviously does not work. The text file is laid out like this: [code]1249968.646,16761001.880,1206.990,1,2,104,3,218210.549527[/code] At the moment this is what my read in code looks like: … | |
Re: You will want to declare those two variables in your main function. Then call your GetString() function with two arguments by reference. As in saying change the declaration of GetString to [icode]GetString(string &choice, string &hint);[/icode] This will send the pointers to the function allowing them to manipulate the values directly … | |
Hello, I am trying to send directory names through the command line to program I am writing. This works perfectly until I add a space to the directory. I have tried adding Quotes around the directories and everything. The problem is then with the \ at the end of the … | |
Re: Easiest way to do it will be to #include algorithm and sort the vector, and then use unique [code=c++]std::sort(Values.begin(), Values.end()); vector<Lidar>::iterator new_end = std::unique(Values.begin(), Values.end());[/code] What that does is move the duplicate entries to the end of the vector and give you a new iterator showing where the new ending … | |
Re: I would check out this link [url]http://www.daniweb.com/forums/thread53349.html[/url] It gives a pretty good answer to what you are looking at. At least how I understand it. Cameron | |
Re: I would check out the documentation for the function here [url]http://msdn2.microsoft.com/en-us/library/ms712879.aspx[/url] it says to use the SND_LOOP flag you must also use the flag SND_ASYNC Hopefully that helps Cameron | |
Re: Personal suggestion, and this might be way out there, but I would look into the Standard Template Library and Vectors ^_^ Maybe I am way off base and you have to do it the way you are attempting but a vector.push_back() and std:: Sort might do the trick :) Cameron | |
Re: What do your errors look like? I think I have an idea of whats going on but I would like to see the output you are getting first. Cameron | |
Re: Well the first thing I see is you don't have your int main() function closed, try adding a } to the end of all that. Cameron | |
Hello, I need to overload my comparison operators such as == and < so that I can use things such as std::sort and std::unique on a vector of some user defined classes. I know how to overload them globally. The problem is I need to overload these operators as member … | |
At this point I am trying to get data from a std::list or std::vector. I push_back the object from a pointer into the list and go on my merry way, I do this until I get to the point I want (which is working at the moment) but then when … | |
Hello, for some reason the code I am trying to write throws an exception about using a priviledged instruction. Problem is it is just comparing two values and throwing this out there at me. Maybe I am completely missing something. Oh and I know its pretty ugly code, you don't … | |
Hello, I am having trouble with the memory size of an array I am using. At the moment I have an array to pointers of objects. These objects get read in from a file and sorted, then a new file is outputted after some filtering is done on the array. … |
The End.