There is one situation where you need to free memory, which is where you have allocated it. If you have allocated it then you MUST deallocate it...
There's no E in the grid. The E appears to be the exit condition, without which the program will search infinitely and use infinite memory.
By the way you can also use an if - else if ladder; you do not have to indent one level each time, and this is perfectly readable: if (BMI <=...
The most obvious thing that is wrong is your use of indentation. Learn to use this correctly and any errors like this will be blindingly obvious....
Changing the entry point of a C program to anything other than main() fails ALL "elegance" tests. The best you can achieve is an ugly hack....
On http://cboard.cprogramming.com/c-programming/141320-help-solve-enigma-please.html you said "This is a test that my University gave me" This is...
If you use a function like fgets this will help you do what you want. Then you just have to inspect the contents of the string for the...
jenn2bowman, what manaila is trying (very badly!) to say is that if you want help, start a new thread. Do not hijack someone else's thread; it's...
Not a good idea unless you deliberately want to obfuscate your code. Instead try this: int main() { return entry(); } then continue as...
To create a class that cannot be instantiated with new you need to declare a private constructor. Of course, you will need to pair this with a...
Yes to both, although this is not good use of malloc. It allocates 10 bytes, but you should allocate N*sizeof(int) instead, where N is how many...
There's so much more to C++ than simple console programs, but that's where you learn the language and you have to do your time there. Where to go...
That update got completely trashed. Try copying it in again, but copy and paste from plain text, not anything formatted. I don't know anything...
How about posting the ACTUAL code? Difficult to comment on the behaviour of code we can't see. Actually the output of main...{ char path[256]...
Same steps as any other kind of optimisation. First establish where the problems are, typically via some kind of profiling. Secondly define...
http://lmgtfy.com/?q=difference+c+c%2B%2B
Very easy. How far have you got and where are you stuck? What algorithm are you going to use?
11 is 3, . is the binary point, 0010001 etc is 0.14. This is 3.14 in binary. Of course, if you're just doing a binary memory dump of the float...
Needs more work - the output is wrong. 3.14 to 32 significant binary digits is 11.001000111101011100001010001111
Different languages are simply different tools in a programmer's toolbox. Just as a mechanic has different sized spanners, so a programmer has...
Separate names with a comma.