Home » General Discussions » General Discussion » I Learn Some Basic C++!
Re: I Learn Some Basic C++! [message #392518 is a reply to message #392448] |
Sat, 27 June 2009 06:58 |
|
jnz
Messages: 3396 Registered: July 2006 Location: 30th century
Karma:
|
General (3 Stars) |
|
|
HTT-Bird wrote on Sat, 27 June 2009 03:18 | SSnipe: Grab "Accelerated C++" by Andrew Koenig and Barbara Moo. That should get you much further than anything I can post in this thread. Once you've worked through that book, you will have a good enough grasp of the language to start playing with Rene-coding.
@SK: Go read "The String Formatters of Manor Farm" by Herb Sutter. That, and we're getting varadic templates in C++0x, so expect to see something >>>> printf soon. Hint:
#include <cstdio>
int main()
{
const char* bad = "this will blow up";
int very = 42;
std::printf("%s%d\n", very, bad);
return 0;
}
With a varadic-template-enabled version of printf, you'd get a compiler error saying "can't convert int to const char*" not Undefined Behavior (translation: crash bang boom) at runtime.
|
Even more reason to be a stupid programmer! I've had my fair share of mismatched format strings, but due to the fact your program will blow up at runtime and the debugger usually catches it make this quite a silly thing to impliment. A lot of the "new" C++ features a simply going to add more bloat, slower code and features, like the one above. That are useless. I personally would like to see more behaviour defined, like default calling conventions. Or even just things like i++ + i--;, even if that is trivial. Another thing would be vtable manipulation, the order of the vtable in derived classes (that have pure or non-pure virtual functions) should be another thing. Redirecting the vtable in some cases can be quite useful. As far as I know, the pointer to the table is not even defined. It could be at any offset to the instance pointer too.
|
|
|
|
|
I Learn Some Basic C++!
|
|
|
Re: I Learn Some Basic C++!
|
|
|
Re: I Learn Some Basic C++!
By: ErroR on Tue, 23 June 2009 08:30
|
|
|
Re: I Learn Some Basic C++!
|
|
|
Re: I Learn Some Basic C++!
|
|
|
Re: I Learn Some Basic C++!
|
|
|
Re: I Learn Some Basic C++!
|
|
|
Re: I Learn Some Basic C++!
By: raven on Tue, 23 June 2009 12:39
|
|
|
Re: I Learn Some Basic C++!
|
|
|
Re: I Learn Some Basic C++!
By: reborn on Tue, 23 June 2009 12:45
|
|
|
Re: I Learn Some Basic C++!
|
|
|
Re: I Learn Some Basic C++!
|
|
|
Re: I Learn Some Basic C++!
By: nopol10 on Tue, 23 June 2009 17:00
|
|
|
Re: I Learn Some Basic C++!
|
|
|
Re: I Learn Some Basic C++!
By: Omar007 on Wed, 24 June 2009 00:51
|
|
|
Re: I Learn Some Basic C++!
By: jnz on Wed, 24 June 2009 10:00
|
|
|
Re: I Learn Some Basic C++!
|
|
|
Re: I Learn Some Basic C++!
|
|
|
Re: I Learn Some Basic C++!
By: jnz on Thu, 25 June 2009 16:14
|
|
|
Re: I Learn Some Basic C++!
|
|
|
Re: I Learn Some Basic C++!
By: raven on Tue, 23 June 2009 18:06
|
|
|
Re: I Learn Some Basic C++!
|
|
|
Re: I Learn Some Basic C++!
By: dr3w2 on Wed, 24 June 2009 21:52
|
|
|
Re: I Learn Some Basic C++!
|
|
|
Re: I Learn Some Basic C++!
By: jnz on Wed, 24 June 2009 23:35
|
|
|
Re: I Learn Some Basic C++!
|
|
|
Re: I Learn Some Basic C++!
|
|
|
Re: I Learn Some Basic C++!
By: cmatt42 on Fri, 26 June 2009 10:27
|
|
|
Re: I Learn Some Basic C++!
|
|
|
Re: I Learn Some Basic C++!
|
|
|
Re: I Learn Some Basic C++!
By: jnz on Sat, 27 June 2009 06:58
|
|
|
Re: I Learn Some Basic C++!
|
|
|
Re: I Learn Some Basic C++!
|
|
|
Re: I Learn Some Basic C++!
By: Omar007 on Sat, 27 June 2009 12:05
|
|
|
Re: I Learn Some Basic C++!
|
|
|
Re: I Learn Some Basic C++!
By: Doitle on Sat, 27 June 2009 20:11
|
|
|
Re: I Learn Some Basic C++!
By: raven on Sat, 27 June 2009 20:57
|
|
|
Re: I Learn Some Basic C++!
|
|
|
Re: I Learn Some Basic C++!
|
|
|
Re: I Learn Some Basic C++!
By: reborn on Tue, 07 July 2009 01:11
|
|
|
Re: I Learn Some Basic C++!
|
|
|
Re: I Learn Some Basic C++!
By: reborn on Sun, 02 August 2009 14:26
|
|
|
Re: I Learn Some Basic C++!
By: _SSnipe_ on Sun, 02 August 2009 14:35
|
Goto Forum:
Current Time: Thu Nov 28 21:25:48 MST 2024
Total time taken to generate the page: 0.01119 seconds
|