Forum: C++ Apr 28th, 2009 |
| Replies: 35 Views: 2,064 An example of this would be to measure the amount of electrical energy in the air at any given point using some sort of analog device, which then converts this into a voltage difference, which is... |
Forum: C++ Mar 5th, 2009 |
| Replies: 6 Views: 726 I don't understand why your are interchanging null terminated c style strings with the String class. The string class alone should suffice here and it handles its own memory (and also contains an... |
Forum: C++ Jan 11th, 2009 |
| Replies: 7 Views: 432 1. Everything that you don't want to modify in a function should have a const tag. And for the function itself, if you don't want to modify any of the classe's members inside a function, it is good... |
Forum: C++ Jan 9th, 2009 |
| Replies: 3 Views: 1,706 Nothing wrong with re-inventing the wheel, so long as its either better or you learned something from it. |
Forum: C++ Jan 6th, 2009 |
| Replies: 6 Views: 509 cin.ignore(cin.rd_buf()->in_avail());
cin.get();
Slap that on the end of the code. This will do the following:
ignore all the available input from the cin (console) input buffer, then grabs a... |
Forum: C++ Nov 24th, 2008 |
| Replies: 1 Views: 279 Unless you want to be harassed off of the forum, you should show some effort as to what you have written so far. And don't expect anybody to write any code for you. |
Forum: C++ Nov 3rd, 2008 |
| Replies: 9 Views: 522 I wouldn't sugguest using system("pause"), as it's not portable :O. cin.get() is a better way to pause in the console. |
Forum: C++ Nov 2nd, 2008 |
| Replies: 3 Views: 480 int list::recursion(int item, int position, node * temp = startPtr)
{
if (temp->next)
{
if(temp->item != item)
recursion(iItem,... |
Forum: C++ Oct 27th, 2008 |
| Replies: 5 Views: 450 Also, checking to see if the pointer is NULL is a method of checking if the memory was actually allocated. But an exception will halt the execution before this can be checked, so the nothrow arg... |
Forum: C++ Oct 27th, 2008 |
| Replies: 2 Views: 518 That's the fifth time you've been asked to use code tags. I'm not going to help you anymore. I explained their syntax 4 times! |
Forum: C++ Oct 25th, 2008 |
| Replies: 5 Views: 612 When you leverage off of the = operator without an overloaded ooperator=() implemented, the compiler uses a predefined method of copying the data by doing a direct member to member copy. Since you... |
Forum: C++ Oct 15th, 2008 |
| Replies: 4 Views: 417 You're almost dead on, so i'll just fix up the syntax for you. You should note that code tags should be used when posting code. The syntax for code tags is
[ code = cplusplus ]...code goes here [... |
Forum: C++ Oct 9th, 2008 |
| Replies: 6 Views: 532 Well if do you know if the memory leak is caused by a recent addition to the code, or has there been memory leaks from the start? You should be checking for mem leaks as you write the code, not at... |
Forum: C++ Oct 2nd, 2008 |
| Replies: 4 Views: 557 I hate it when people offer me money for my homework. If it doesn't make sense to you, perhaps you've chosen the wrong field? I mean, how are you going to explain to your boss that you have no idea... |