Thread: Things you hate in C/C++

  1. #1
    Registered User
    Join Date
    Nov 2001
    Posts
    65

    Things you hate in C/C++

    Hey guys, I want to know the features you are most annoyed in C/C++. (apart from segmentation faults)
    I await your feedback.
    The experimenter who does not know what he is looking for will not understand what he finds.
    - Claude Bernard

  2. #2
    Registered User
    Join Date
    Jan 2002
    Location
    Vancouver
    Posts
    2,212
    Goto.

    They should get rid of it. It is capable of ****ing up perfectly good code.

  3. #3
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    I hate it if I write a proggie in winapi or whatever that works as sweet as a nut on my Win2K PC, then I go to work and try show it off and the damn thing doesnt work for whatever reason......BAH

  4. #4
    Registered User
    Join Date
    Sep 2001
    Posts
    752
    1. I would really like to change how it handles integer division w/ negative numbers... basically, / should always round down, and % should always give a positive result.

    2. A preprocessor operator that could tell the type of a variable would be nice (kinda like sizeof(), but typeof())

    3. Using 0 as NULL should be undefined.
    Callou collei we'll code the way
    Of prime numbers and pings!

  5. #5
    Hamster without a wheel iain's Avatar
    Join Date
    Aug 2001
    Posts
    1,385
    int main (void) should be compulsary, compilers should throw an error if they encounter void main () or any other alias of it

    compilers should throw a warning if it encounters a system call
    Monday - what a way to spend a seventh of your life

  6. #6
    Just because ygfperson's Avatar
    Join Date
    Jan 2002
    Posts
    2,490
    the strings. it gets very confusing. i sometimes don't know if my pointer has a real string attached or not. basically a new variable type but which clears out space during initialization, acts like a normal variable(so it can pass the string into a func. like any other one), and can assign a string to a variable without the programmer being worried about buffer overruns, strcpy, etc...

  7. #7
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,823
    Programs that don't work.

  8. #8
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Posts
    3,227
    Originally posted by Govtcheez
    Programs that don't work.
    Of course, everyone knows that if a program won't work it's not your fault, it's most definately the language.

  9. #9
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,823
    > it's most definately the language.

    Absolutely. My compiler should know what I want to do and do it. And then order me pizza.

  10. #10
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,743
    the error:

    To many error or warning messages.

    I hate it when i get that one....then I know Ive done something wrong...

    And where the heck is this "Any" key everybody speaks of?
    My Website

    "Circular logic is good because it is."

  11. #11
    I hate malloc and all its friends (C). Mainly because I always forget to use them.
    DrakkenKorin

    Get off my Intarweb!!!!

  12. #12
    Seņor Member
    Join Date
    Jan 2002
    Posts
    560
    The syntax, its so ugly (with semicolons and whatnot) as well as how much of a pain in the ass it is to do graphics (I finished qBASIC programming before this and it was sooooo simple to do simple graphics). Also sometimes 1 little syntax error can somehow give you 50 freakin errors. And i hate the fact that floats aren't that accurate and as far as I know (someone correct me if I'm wrong) you can't make a data type like a quadruple float.

  13. #13
    Registered User
    Join Date
    Nov 2001
    Posts
    65
    I actually hate excessive use of preprocessor. I was looking at the source of linux kernel and saw stuff like that

    in file zz.h
    #include xx.h
    #define _status (x) >> 1


    in file xx.h
    #define __status _status
    A couple of lines below
    #define ___status __status

    Yes, The language can give you some capabilities. But why are these programmers are in love with these definitions? When I look at the code half of my time is wasted to understand what these #defines mean.
    The experimenter who does not know what he is looking for will not understand what he finds.
    - Claude Bernard

  14. #14
    A Banana Yoshi's Avatar
    Join Date
    Oct 2001
    Posts
    859
    The programmer's worst nightmare (access violation).
    Yoshi

  15. #15
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    Originally posted by ozgulker
    I actually hate excessive use of preprocessor. I was looking at the source of linux kernel and saw stuff like that

    in file zz.h
    #include xx.h
    #define _status (x) >> 1


    in file xx.h
    #define __status _status
    A couple of lines below
    #define ___status __status

    Yes, The language can give you some capabilities. But why are these programmers are in love with these definitions? When I look at the code half of my time is wasted to understand what these #defines mean.
    Gah...yes I totally aggree. If you create an app with MFC, the preprocessor commands and comments make it difficult to read what the hell was actually produced.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Suggestions for things to study
    By Mastadex in forum Windows Programming
    Replies: 5
    Last Post: 08-18-2008, 09:23 AM
  2. 2 things at once?
    By bradszy in forum C++ Programming
    Replies: 7
    Last Post: 02-20-2008, 01:19 PM
  3. Pet Peeves
    By Srg Pepper in forum A Brief History of Cprogramming.com
    Replies: 29
    Last Post: 10-03-2002, 11:34 AM
  4. Help with these three things...
    By face_master in forum C++ Programming
    Replies: 2
    Last Post: 08-26-2001, 07:05 AM