No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
12 Posted Topics
Re: Well, your main block only reads in a line -- where in particular are you looking for help/where are you stuck? | |
Re: C++ hasn't changed all that drastically to the point where legacy code wouldn't work. Are you sure that your program isn't working? If you're using Visual C++, for example, if you try and run the program normally, it will exit right after successfully executing all statements. With your program, after … | |
Re: Well, I'm not crazy about the way you approached the problem. I liked the wikipedia entry on this problem: [url]http://en.wikipedia.org/wiki/Eight_queens[/url], where it mentions: [QUOTE]"Most often, it is used as an example of a problem which can be solved with a recursive algorithm, by phrasing the n queens problem inductively in … | |
Hi guys, Design question: I have a class that contains 2 vectors, and I'd like for that class to provide a public interface to access the next element in either list. The easy way to do it is to obviously return the list itself, either const or not, but this … | |
Re: Well, if you want to do it with loops, you just need to reverse your loop and you'll generate the other side of the pyramid. [ICODE]for (y=n-1;y>=1;y--) {...}[/ICODE] should generate the other end. | |
Re: If you include the main block, or an example of how you're trying to use the program, that would definitely help. Personally, I'm a little stuck on your usage of cin.get() after every printSuit() command -- is it possible you're simply not hitting a key after you execute it? Also, … | |
Re: I think MyrtleTurtle had the correct answer, even if while loops aren't necessary. He recommended code that would read multiple names and payment rates, but you are only trying to read one. For the code you were using: [CODE] getline(inData,payto); inData >> payto; inData >> rate;[/CODE] getline reads the first … | |
Re: You're just asking someone to do your homework. You can find the answer to the first question by running a google search for srand. Since this is for a C++ class, I can only assume you are able to compile C++ code, which would let you verify the answers for … | |
Hi guys, I'm writing a simple function to return the file portion of a path. Strangely, the results I'm trying to duplicate accept something like a/b/c\d\e\file as a valid path, so I'm really just searching for the last occurrence of a slash or backslash. Anyhow, I'm curious what your thoughts … | |
Hi all, I'm a little wary of posting this, since there were no posts on autoexp.dat, and this is a general C++ forum, but I thought I'd give it a shot. I'm trying to create an AddIn to display some custom datatypes for an application that uses RogueWave. I created … | |
Hi all, My first post here -- I've been trying to update some old code that uses C-style casts into the C++ equivalent, and I've stumbled on one cast that I can't figure out how to convert. This isn't the code that was giving me issues, but it reproduces the … |
The End.