Posts
 
Reputation
Joined
Last Seen
Ranked #366
Strength to Increase Rep
+4
Strength to Decrease Rep
-1
100% Quality Score
Upvotes Received
2
Posts with Upvotes
2
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
2 Commented Posts
0 Endorsements
Ranked #4K
~3K People Reached
Favorite Tags
c x 8
c++ x 6
Member Avatar for herms14
Member Avatar for gretty

If your code has a lot of pointer stuff in it, it's often a good idea to run "valgrind" every once in a while to check for memory leaks. It's often a good idea to create some sort of "debug output" function for a class to print its state. That …

Member Avatar for Dingbats
0
153
Member Avatar for destroyed

Here's some really general advice: Do a project that builds on something you learned in one of your Software Engineering courses. Use design patterns, good programming style throughout .etc Pick something you like so you don't end up dreading the project.

Member Avatar for peter_budo
0
348
Member Avatar for nateuni
Member Avatar for nateuni
0
525
Member Avatar for TGeorge824

Other than adding the "&" to the scanf statement . . . Why do you do the following loop? [CODE] while(x<=num) //Checks the numbers for their status { detect(num); x++; } [/CODE] If you want to check all numbers between 2 and num, then you must detect(x) rather than detect(num). …

Member Avatar for yellowSnow
0
93
Member Avatar for suutukil

Look up the "bubble-sort" algorithm and/or the "selection sort" algorithm. These are the easiest to understand sorting algorithms IMO. Once you know the algorithms, implementing them will be easy. Good luck!

Member Avatar for wheel
0
157
Member Avatar for TGeorge824

You need to pass the address of "num" to scanf using the & (address of) operator. This allows scanf to actually modify the variable "num". Like this: [CODE] /* Fixed input*/ scanf("%d", &num); [/CODE] Good luck!

Member Avatar for TGeorge824
0
99
Member Avatar for rstep21

First of all, for file I/O, read a good tutorial on file streams (and streams in general). Just check [URL="http://www.google.com/"]Google[/URL]. You should know how to define a function already. Here's an example just in case: [CODE] /* Sample function that adds two integers */ int add(int a, int b) { …

Member Avatar for wheel
0
115
Member Avatar for swinefish

You could simulate some sort of community of simple creatures (like ants or bees.) The creatures would need food to survive, and would need to reproduce .etc Interactions between the creatures could communicate location of food and shelter. For fun, you could add in some sort of fighting mechanism where …

Member Avatar for Nick Evan
0
168
Member Avatar for hket89

Yes, that is easily possible. Just use a pointer to a pointer. Basically, in the same way a pointer can "point" to a piece of memory that holds some data (like an int or a char), a pointer can "point" to another pointer. Basically, you pass a pointer to a …

Member Avatar for wheel
0
154
Member Avatar for wheel

Hello! I'm wondering how to go about packing data from an std::vector<unsigned long> into valid unicode (UTF-8) characters. So far, I've tried writing the unsigned long data directly to a text file, but that usually results in invalid characters. (I don't actually need to store the data in unsigned long …

Member Avatar for wheel
0
184
Member Avatar for gretty

Try checking cin.fail(). If it is true, something went wrong with the input operation. Good Luck!

Member Avatar for mrnutty
0
227