View Poll Results: What do you think cout should be named?

Voters
17. You may not vote on this poll
  • text

    0 0%
  • print

    1 5.88%
  • display

    1 5.88%
  • write

    1 5.88%
  • cout

    13 76.47%
  • textline

    0 0%
  • other (reply if you select this)

    1 5.88%

Thread: Sean inspired me to do this...

  1. #1

    Sean inspired me to do this...

    I am going to take all the C++ headers, and clean them up abit, and add a few new functions. I will change around some of the names, the first I am going to change, if I can, is cout. I don't know what I shall name it. I am also going to change the fstream classes around. This is going to be a long project, but it may help out some newbies. I'll have a page on it on my site pretty soon, once I get the site back up again. I will call it *C++ (Star C++). It will be very small until a lot of people download it, so there will be more than just one site on it. Hardly anyone will download it probably though.

  2. #2
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    Well I'm flattered that I inspired you to do this, but I will require 10% of the profits, and I must warn you, this won't work, unless you include every file in one big library, and then make new functions call old ones, otherwise you'd have to rewrite all the assembler that C++ is built on. Good luck!

  3. #3
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    Clean what up? If you don't like a function name, define your own.

    #define TakeOutTheTrash delete

    In fact, here's my offering to all:
    a small data type validation library.

    Expand at your own leisure...


    Code:
    
    
    
    
    
    
    int IsFloat(char *s)
    {
    
    int bad = -1;
    
    for(i = 0; i < strlen(s); i++)
    {
    if(!isdigit(s[i]) && s[i] != '.')
    return 0;
    if(s[i] == '.')
    bad++;
    }
    if(bad)
    return 0;
    
    return 1;
    }
    
    
    
    //_________
    
    
    
    
    
    int IsInt(char *s)
    {
    while(*s)
    {
    if(!isdigit(*s++))
    return 0;
    }
    return 1;
    }
    
    
    
    
    //_________
    
    
    
    
    
    
    IsWord(char *s)
    {
    while(*s)
    !isalpha(*s) ? return 0 : *s++;
    return 1; 
    }
    But how many textual digits were encountered? 10? 88? It makes a difference! So you should try to make that improvement first.
    Last edited by Sebastiani; 12-27-2001 at 03:15 PM.
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  4. #4
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Posts
    3,227
    I know what cout should be named! printf()!

    MUHAHAHAHA!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Happy Birthday Sean
    By RobR in forum A Brief History of Cprogramming.com
    Replies: 12
    Last Post: 05-01-2005, 06:17 PM
  2. proof read this for Sean Mackrory
    By confuted in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 09-14-2003, 02:33 PM
  3. What inspired you to become a computer programming?
    By ZooTrigger1191 in forum A Brief History of Cprogramming.com
    Replies: 35
    Last Post: 02-10-2003, 07:03 AM
  4. Cheesy Moo Inspired Me
    By NickESP in forum Game Programming
    Replies: 5
    Last Post: 02-07-2003, 09:35 PM