Forum: C++ Sep 23rd, 2009 |
| Replies: 8 Views: 258 Or maybe you have a const method and you try to decrement a member variable in this method. |
Forum: C++ Sep 2nd, 2009 |
| Replies: 3 Views: 475 This is Windows code, not Linux. |
Forum: C++ Jul 21st, 2009 |
| Replies: 4 Views: 399 Translation for beginners ;)
search Google for: CTreeCtrl background image
select the second topic found (@codeguru.com) |
Forum: C++ Jul 15th, 2009 |
| Replies: 15 Views: 757 The source code for VS2005/8 can be found at http://msdn.microsoft.com/en-us/library/f35t8fts(VS.80).aspx |
Forum: C++ Jul 14th, 2009 |
| Replies: 15 Views: 757 Your OnSim should look like:
void YourFirstDialog::OnSim()
{
CSimConFig dlg;
dlg.DoModal();
} |
Forum: C++ Jul 9th, 2009 |
| Replies: 4 Views: 319 urgently required: a meaningful title for your posting(s)
urgently required: the source code you have done so far
urgently required: moderators who close irregular postings
urgently required: new... |
Forum: C++ Jul 8th, 2009 |
| Replies: 3 Views: 675 Use two buffers or even better two std::strings:
ifstream os; // variable name misleading!
string prev, curr;
while(getline(os, curr))
{
...
prev = curr;
} |
Forum: C++ Jul 6th, 2009 |
| Replies: 2 Views: 251 3. use a meaningful title |
Forum: C++ Jun 25th, 2009 |
| Replies: 2 Views: 284 I prefer
void A::getSomeStuff(vector<int> & vec)
{
...
}
to avoid a possible copy on return. |
Forum: C++ Jun 22nd, 2009 |
| Replies: 5 Views: 1,575 Some people use to eat their soup with a fork....... |
Forum: C++ Jun 22nd, 2009 |
| Replies: 2 Views: 353 wchar_t means wide character. You can't convert a wchar_t to a char by "brute force casting" it. You have to call an appropriate function to convert it. Take a look at wcstombs_s(), additionally... |
Forum: C++ Jun 19th, 2009 |
| Replies: 7 Views: 587 http://lmgtfy.com/?q=omniORB
If I remember correctly I wrote: "omniORB contains a tool..."
The name of this command line tool is omniidl.exe and translates your .idl to .cpp (if provided with... |
Forum: C++ Jun 19th, 2009 |
| Replies: 9 Views: 686 And why 49 and 57 instead of '0' and '9'??? Are you training for an obfuscation contest? |
Forum: C++ May 29th, 2009 |
| Replies: 9 Views: 495 Reread the article of the TO carefully. |
Forum: C++ Apr 23rd, 2009 |
| Replies: 7 Views: 515 std::transform(msg.begin(), msg.end(), msg.begin(), std::tolower); |
Forum: C++ Apr 6th, 2009 |
| Replies: 10 Views: 578 You are right. The only difference between op= and copy ctor is that you have to dump the old data in op=.
In such a case I nearly always use this sort of "pattern" for my classes:
class A
... |
Forum: C++ Mar 26th, 2009 |
| Replies: 4 Views: 370 Have you ever stepped thru commentLine() in the debugger?? I think this crap does not do what you want! And by the way, what about passing your string by reference to commentLine() and then use... |
Forum: C++ Mar 6th, 2009 |
| Replies: 4 Views: 1,394 erase() invalidates the iterator passed, but it returns a valid iterator. Just change the code to:
i = v.erase(i); |
Forum: C++ Mar 6th, 2009 |
| Replies: 8 Views: 746 You are not filling names[] from dataIn |
Forum: C++ Feb 17th, 2009 |
| Replies: 1 Views: 378 Visual C++ is an Integrated Development Environment which includes a (ANSI-) C++ Compiler. |
Forum: C++ Feb 17th, 2009 |
| Replies: 4 Views: 305 If is_prime() is entered with parameter 1 then y/2 evaluates to 0, because a is of type int. So the for loop is not executed and true is returned.
One more tipp: it is sufficient to iterate up to... |
Forum: C++ Feb 11th, 2009 |
| Replies: 3 Views: 303 Try http://software.ellerton.net/tinyxml.html |
Forum: C++ Feb 9th, 2009 |
| Replies: 4 Views: 662 May be this is helpful for you: http://www.fredosaurus.com/notes-cpp/oop-condestructors/copyconstructors.html |
Forum: C++ Feb 9th, 2009 |
| Replies: 1 Views: 217 Why should they? If you need iterators for stacks or queues perhaps you are using the wrong type of container. Stacks and queues have limited access by design, this should not be circumvented by... |
Forum: C++ Jan 19th, 2009 |
| Replies: 5 Views: 429 No, it is a type declaration of a function pointer:
TEntryFunction is a pointer to a function taking no argunemts and returning a IGameFramework pointer. |
Forum: C++ Jan 19th, 2009 |
| Replies: 2 Views: 329 Try to disable precompiled headers in the properties of the file causing the error message. You can find it in section "C/C++" and then "precompiled headers" |
Forum: C++ Dec 5th, 2008 |
| Replies: 2 Views: 399 ...and familiarize yourself with code tags. That will increase your chance to get an answer enormously. |
Forum: C++ Oct 23rd, 2008 |
| Replies: 2 Views: 408 What about using STL algorithms and avoiding the temporary copy of the vector????
Considering this should result in code like (recite from memory, not tested!!!):
CPlotter &... |
Forum: C++ Oct 16th, 2008 |
| Replies: 12 Views: 740 a small enhancement:
If (YouHaveMoney)
{
UseVisualStudio
}
else
{
UseVisualStudioExpress;
} |
Forum: C++ Sep 19th, 2008 |
| Replies: 6 Views: 2,215 Suppose you have (for explanation unnecessary features stripped!):
class Animal
{
virtual void output() = 0;
};
class Dog : public Animal
{ |
Forum: C++ Jun 27th, 2008 |
| Replies: 1 Views: 1,327 Try http://www.microsoft.com/learning/vstudio/2008/default.mspx |