Forum: C++ Oct 24th, 2008 |
| Replies: 2 Views: 631 You should check your microphone. It can sometimes be a problem (conflicts with compiler for c++) |
Forum: C++ Oct 19th, 2008 |
| Replies: 2 Views: 312 while( chioce != 'n' );}
should actually be:
} while( chioce != 'n' );
Have a nice coding :) |
Forum: C++ Oct 19th, 2008 |
| Replies: 5 Views: 628 I tried to count lines to see which one is line 39, and I managed it, but for future:
[code=cplusplus] please, not just [code]!!!
case 'I' : case 'i ' :
Notice that second 'i ', do you see a... |
Forum: C++ Oct 19th, 2008 |
| Replies: 2 Views: 570 Reason is that sstr is set to false AFTER trying to read after EOF. So first you read last item, it's ok, when while sees no error, continues, but you can't read more, so x is assigned to last good... |
Forum: C Oct 18th, 2008 |
| Replies: 4 Views: 620 First you write code in some text editor. It doesn't matter what editor, it could even be notepad.
Then you have to compile that code.
Compilation refers to the processing of source code files (.c,... |
Forum: C++ Oct 16th, 2008 |
| Replies: 9 Views: 732 THIS compiled ok on dev-cpp:
int main()
{
DWORD dwThreadId;
HANDLE myThread;
void *ptr=NULL;
myThread = CreateThread(
NULL, |
Forum: C++ Oct 15th, 2008 |
| Replies: 11 Views: 791 The while loop won't work properly, eof is unsafe to use in looping.
This is better:
while (getline(locationtemp, line)){
numbers[x++] = strtod(line);
} |
Forum: C Oct 14th, 2008 |
| Replies: 7 Views: 691 The first one is "passing arguments to pointers". In that way, you can change original variable!
Second one is "passing arguments as references".
You cannot do that in C, C always passes arguments... |
Forum: C++ Oct 12th, 2008 |
| Replies: 4 Views: 460 while(soldiers.size()==1)
This while statement is ill |
Forum: C++ Oct 11th, 2008 |
| Replies: 11 Views: 1,445 Are you sure this code works:
ll = queue.ll;
'll' is under private section, right? I'm not sure if you can access it.
Here's my code example if it helps:
//operators
//=
Complex&... |
Forum: C++ Oct 9th, 2008 |
| Replies: 3 Views: 606 >void Montecarlo(void);
>{
What's that semicolon doing there? :) |
Forum: C++ Oct 6th, 2008 |
| Replies: 2 Views: 373 I made slight adjustment:
sky.erase(sky.begin()+x);
More on: http://www.cplusplus.com/reference/string/string/erase.html
EDIT: oh yes, x <= sky.size() is wrong, should be x < sky.size() |
Forum: C++ Sep 27th, 2008 |
| Replies: 11 Views: 1,213 I don't see why there should be any difference. When you write:
void MyClass Func (const MyClass f)
//or even simply:
const MyClass f(some_MyClass_obj);
And let's say we call Func:
... |
Forum: C++ Sep 23rd, 2008 |
| Replies: 6 Views: 1,048 If you want to be able to write
something = 4 + var;
You have to overload once more operator+.
First, declare it as friend of class, and then write it like:
Array<T> operator+ (const... |
Forum: C++ Sep 19th, 2008 |
| Replies: 3 Views: 585 It's a long shot, but maybe while optimizing compiler got rid of unneeded functions and code in library? |