Thread: Looking for constructive criticism

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    You're doing this is an extremely complicated way, way more than necessary.
    C has built-in types for integers. You can use int or long long for numbers instead and it would be easier.
    Note also that some structs have pointers as members where you allocate memory to, but you never free those. Freeing the struct does not free the memory associated with its pointers.

    You also read strings with scanf in the wrong way. See http://cpwiki.sourceforge.net/Buffer_overrun
    Also take a look at http://www.cse.scu.edu/~tschwarz/COE...es/Strings.ppt if you can, as it highlights the pitfalls and security issues of C.
    Last edited by Elysia; 05-24-2008 at 03:04 PM.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Rewrote my cMap class. Looking for more criticism
    By Raigne in forum C++ Programming
    Replies: 18
    Last Post: 11-07-2008, 01:58 PM
  2. Looking for criticism on my GameState class
    By Raigne in forum Game Programming
    Replies: 1
    Last Post: 03-21-2008, 09:45 AM
  3. Constructive criticism highly appreciated!
    By muggizuggi in forum C++ Programming
    Replies: 17
    Last Post: 08-01-2005, 11:54 AM
  4. Alpha Criticism: Part One......
    By Alphacentric666 in forum C++ Programming
    Replies: 11
    Last Post: 01-28-2003, 11:40 PM
  5. a little OT, but, criticism and avice wanted !
    By Shadow in forum C++ Programming
    Replies: 2
    Last Post: 10-01-2001, 08:38 AM