The Daily WTF: Curious Perversions in Information Technology
Welcome to TDWTF Forums Sign in | Join | Help
in Search

Browse by Tags

All Tags » C++ (RSS)
  • c++ flow control - did I miss something?

    Is the coder who wrote the following code (which I found earlier tucked away in a project) a genius who knows something I don't, or is it just as pointless as I suspect? for(int i=1; i<=2; i++) { switch(i) { case 1: /* do something */ break; case 2: /* do the next thing */ break; } }
    Posted to Forum by blatant_mcfakename on 02-02-2010
  • Re: Java Interview gone wrong

    Actually, who hasn't done: #ifdef __cplusplus extern "C" { #endif The language has its full name built right in.
    Posted to Forum by lolwtf on 09-21-2009
  • Re: Java Interview gone wrong

    [quote user="lolwtf"]What about "C double plus", is that wrong too? Is it perhaps "C plus equals one" or "C equals C plus one"?[/quote] A certain professor I know calls it "C two pluses".
    Posted to Forum by Spectre on 09-19-2009
  • program quit automatically

    #include typedef struct { char* author; char* title; char* isbn; int edition; } Book; int main() { int howmanyrecords; int counter=0; printf("How Many Record you want ?"); scanf("%d",&howmanyrecords); Book *pbook[howmanyrecords]; for(counter=0;counterauthor); printf("enter...
    Posted to Forum by guest18 on 08-06-2009
  • Re: Opaque? What does that mean?

    Um, maybe you could try += ?
    Posted to Forum by SlyEcho on 03-04-2009
  • C++ and doubles

    I had my lab in a really stupid mandatory freshmen-level "intro to computer science" class this morning; the only thing that throws me from time to time is I haven't touched C++ since I was 12. However, even the teacher was a bit confused about a bug that was cropping up. Maybe someone...
    Posted to Forum by yamikuronue on 02-04-2009
  • Re: not-not

    [quote user="belgariontheking"] [quote user="bstorer"][quote user="Mole"]Its the same as you can do var=var+1, but why bother when you can just do var++[/quote] And why bother doing var++ when you should be doing ++var?[/quote]But the language is called C++, not ++C. I don't...
    Posted to Forum by SlyEcho on 01-21-2009
  • Re: VB.NET chops the Ouroboros in half! Critical hit! The Ouroboros takes 0 damage!

    [quote user="GettinSadda"]In C (and C++ etc.) there is no such thing as a Statement - everything is a function, and therefore an Expression.[/quote] That is preposterous. C has the following types of statements: compound statement ( { ... } ); expression statement (expression + ; ); null statement...
    Posted to Forum by Spectre on 01-10-2009
Page 1 of 1 (8 items)
Powered by Community Server (Non-Commercial Edition), by Telligent Systems