Thread: Apoutput Class - DOWNLOAD!

  1. #1
    Registered User
    Join Date
    Sep 2002
    Posts
    417

    Apoutput Class - DOWNLOAD!

    This is a modififed version of printf with a lot of nice little escape sequences, including +fb to add blue to the foreground :-)

    It also lets you move the cursor around, and each object of it has a different coordinate. In other words, cout will output like normal, but each apoutput can have a different place it outputs from!

    You can even move the cursor via escape sequences!
    Last edited by Trauts; 04-10-2003 at 11:37 AM.

  2. #2
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    downloaded that and looked at it. it seems very poorly designed and implemented. By christ one member function is about 6 pages long!
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

  3. #3
    Registered User
    Join Date
    Sep 2002
    Posts
    417
    compile the test.cpp, and swap which area is commented...

    It has to be long or the escape sequences are pointless.

    It has a lot of mini-"functions" in the print function so that it can check escape sequences.

    It still runs fine.

    See, the whole point of it WAS the long function. Otherwise you can't have the escape sequences... they'd just be text otherwise.

    Don't be a hypocrite: try it before you say its crap. Then feel free to say what you want, as long as you actually tried it.
    Last edited by Trauts; 04-10-2003 at 04:55 PM.

  4. #4
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,138
    Originally posted by Trauts
    compile the test.cpp, and swap which area is commented...

    It has to be long or the escape sequences are pointless.

    It has a lot of mini-"functions" in the print function so that it can check escape sequences.

    It still runs fine.

    See, the whole point of it WAS the long function. Otherwise you can't have the escape sequences... they'd just be text otherwise.

    Don't be a hypocrite: try it before you say its crap. Then feel free to say what you want, as long as you actually tried it.
    Just warning you... Criticizing one of the most intelligent members of the board is likely to backfire.

  5. #5
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    That code was thoroughly looked at. I stand by my first comment that it is poorly designed and implemented.
    To say that a function MUST be extra long and that was the point of the code just goes to show how weak it is. Almost any function can be split into further smaller functions. This makes code more readable, better implemented and most important of all to professional and good amateur programmers easier to update.
    Read as much as you can about the PIMPL idiom and how it can help you.
    For a few tips on what to do and what not to do i point you to this and this .
    Last edited by Stoned_Coder; 04-10-2003 at 06:56 PM.
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

  6. #6
    Registered User
    Join Date
    Sep 2002
    Posts
    417
    Please try it before you criticize it.

    Looking at code is not the same as compiling it.

  7. #7
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    please dont treat me like im an idiot. Im not I assure you. As i said I tested your code, compiled,linked etc. It is poor. If you cannot take constructive criticism then dont post code asking for comments. You use strcpy() which is a buffer overrun waiting to happen. You use enormous monolithic functions. There is not a programmer in the land who will tell you that your code is good and well designed because simply put it isnt.
    Did you check out the links i gave you?
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

  8. #8
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,138
    Originally posted by Trauts
    Please try it before you criticize it.

    Looking at code is not the same as compiling it.
    Writing a good program is not the same as writing a functional program. For instance...

    Code:
    #include <iostream>
    
    int main(void)
    {     std::cout<<"H";
          goto 2;
          4:
          std::cout<<"l";
          goto 5;
          2:
          std::cout<<"e";
          goto 3;
          5:
          std::cout<<"o";
          goto 6;
          3:
          std::cout<<"l";
          goto 4;
          6:
          std::cout<<" World"<<std::endl;
    }
    How good is that program?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  2. Creating a database
    By Shamino in forum Game Programming
    Replies: 19
    Last Post: 06-10-2007, 01:09 PM
  3. Need help to build network class
    By weeb0 in forum C++ Programming
    Replies: 0
    Last Post: 02-01-2006, 11:33 AM
  4. class errors
    By romeoz in forum C++ Programming
    Replies: 3
    Last Post: 09-16-2003, 07:57 PM