Page 1 of 3 123 Last
  • Jump to page:
    #1
  1. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Sep 2000
    Posts
    763
    Rep Power
    0

    C, C++ Function Referance?


    Hello and Good day to ya'll :)

    I have been looking for a website for C, C++ that has a function referance, similar to the php function referance. I have tried searching on google, but have not had any luck.

    Any help would be appreciated.

    Eclipce
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,966
    Rep Power
    190
    this is not to be answered in one sentence ;)

    ok, if you talk about C, you should correctly say "Ansi C" since there is several C languages. "Ansi C" is a well-defined language and the only reference that i have is the Kernighan and Ritchie :( but search on google. it should be on the Žnet...

    but when you want to do more than only console / server / daemon programming, youŽll need libraries. then you should get the function list and description with them.

    if you talk about microsoft visual c or another C for windows programming, go to http://msdn.microsoft.com

    for linux, you have section 2 of the man pages (if installed) :)
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Sep 2000
    Posts
    763
    Rep Power
    0
    Thanks for the reply. I was able to figure it out. Now the only problem I seem to have is copying one variable to another.

    Code:
    char dir, buffer[_MAX_PATH];
    
    getcwd(buffer, _MAX_PATH);
    
    dir = buffer;
    or
    Code:
    char dir, buffer[_MAX_PATH];
    
    getcwd(buffer, _MAX_PATH);
    
    strcpy(dir, buffer);
    Both give me a "cannot convert from 'char *' to 'char' This conversion requires a reinterpret_cast, a C-style cast or function-style cast" error. I guess I am looking in the wrong spot, because I can not find anything about this in the help.

    Any help here would be nice.

    Eclipce
  6. #4
  7. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2001
    Location
    USA
    Posts
    286
    Rep Power
    13
    In the first case, you're trying to copy a character pointer into a single character variable (the first element of an array is actually a pointer to the address of the array). You need to make dir a char pointer.

    Code:
    char *dir, buffer[_MAX_PATH];
    ...
    In the second case, you need to make dir a character buffer like buffer. You can do that in two ways:

    Code:
    char *dir = new char[_MAX_PATH];
    ...
    // Remember to delete the memory that you created when you're done.
    delete [] dir;
    or

    Code:
    char dir[_MAX_PATH];
    ...
    Jon Sagara

    "Me fail English? That's unpossible!"
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Sep 2000
    Posts
    763
    Rep Power
    0
    Thanks for the reply. I guess I am just used to dealing with varialbles like in php.

    Eclipce
  10. #6
  11. No Profile Picture

    Join Date
    May 2002
    Posts
    17
    Rep Power
    0
    yes, i noticed the fact that pHP variables are very weakly typed, unlike the "char OR DIE!" type of stuff you see in C/C++/ and especially java.

    You are going to have to get used to the strict type-checking of C and ween yourself off of the devil-may-care-about-variables PHP.

    good luck.
  12. #7
  13. Born Looser
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2002
    Location
    /root
    Posts
    272
    Rep Power
    173

    Unhappy the question is there


    OK pal I need standard B]c and c++[[/B] function as like we have for PHP. I bet no one has seen a manula like PHP. I love php not becouse it is easy b'coz it is easy to find out than to look at definations and wonder what they meant. I have DevC++ and code using Dev C++ and MSVC is expensive thing to get So Can I get some light where is a manual for Standard/ISO/Ansii(/ASCII/Blue Sky what ever it is ;) C and C++ . It will be also apprecaited if some one suggest a book which is like C or C++ manual.
    Kumar Chetan Sharma
    -----

    _SelfProcclaimedGuru
    Hire a LAMP guy.
    To err is human. To blame your computer for your mistakes is even more human, it is downright natural.
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,966
    Rep Power
    190
    Imho "the" C-Manual is the "Kernighan and Ritchie - Programming C". These two guys "invented" C (and unix i think).
  16. #9
  17. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2001
    Location
    USA
    Posts
    286
    Rep Power
    13
    ... and the "standard" C++ book is "The C++ Programming Language", written by Bjarne Stroustrup, the creator of C++.
    Jon Sagara

    "Me fail English? That's unpossible!"
  18. #10
  19. Born Looser
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2002
    Location
    /root
    Posts
    272
    Rep Power
    173

    Unhappy Again..........


    ooops I am wrong again. I have the Tandard DenRit... C Book but that is not like php manual. I am looking a thing as acomaptible to PHP manual. You know it then let me know.
    Oh plezzzzzzzzzz Help meeeeee
    Kumar Chetan Sharma
    -----

    _SelfProcclaimedGuru
    Hire a LAMP guy.
    To err is human. To blame your computer for your mistakes is even more human, it is downright natural.
  20. #11
  21. /(bb|[^b]{2})/

    Join Date
    Nov 2001
    Location
    Somewhere in the great unknown
    Posts
    5,163
    Rep Power
    792
    I really rather doubt that you will find a book out there that is built like the php manual.
    The reason behind this? Well, there is only 1 place to get php, so all functionality can be documented via that company. Now C/C++ is a different story. As far as the base language, it is basically all the same for each language, and is rather small considering. The vast majority of C/C++ complexity comes from its libraries. Any time you #include <file.h> you are including a library/api. These vary from operating system and compiler type. You wont find some functions in VC++ that you will find in the Borland version. Same thing with gcc. You will find plenty of reference manuals that will explain in depth various versions of C/C++, but most manuals try to explain as close to the ansi standard as possible.

    The books recommended by M.Hirsch and jonsagara are probably two of the best out there.
  22. #12
  23. Born Looser
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2002
    Location
    /root
    Posts
    272
    Rep Power
    173

    Unhappy So what is I am supposed to do?


    I am a fool. I knew that PHP is centralised at php.net but forget that c/c++ are not. Yes it is true that I will never find anything like this. we have a refrence for php/perl/javascript/html/vb/asp/.. but none for C/C++ . Every one know that C/C++ is the ultimate thing in computing. OK I will get those books. some one told me I should get manual for DevC++ if I use it. but they don't have any. also the help with TC++ is not that upto the mark(Means that fools like me can't understand it.)

    Hey thanx for all this.
    Kumar Chetan Sharma
    -----

    _SelfProcclaimedGuru
    Hire a LAMP guy.
    To err is human. To blame your computer for your mistakes is even more human, it is downright natural.
  24. #13
  25. /(bb|[^b]{2})/

    Join Date
    Nov 2001
    Location
    Somewhere in the great unknown
    Posts
    5,163
    Rep Power
    792
    Well, I can't comment on DevC++, but TC++ isn't really used unless you are doing dos/16 bit apps. That is what I took in school, but it is outdated.
    Of the top compilers out there, the most popular are Borland, gcc and VC++. Watcom is also making a comback and bloodshed is also decent but finding acurate information on those are a little harder.
  26. #14
  27. Born Looser
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2002
    Location
    /root
    Posts
    272
    Rep Power
    173

    I am a student


    Basically I do C/C++ to make sure i do not get fail in My Level 'A' exams. MS VC++ is as I said is out of reach for a poor guy like me.. Even getting Licensed TC++, which is outdated as you siad, is hard. The one I used was in 1999 at some institute. I will really love to know something even if a book exists that just summarizes the functions of all ANSI C or the very standard C++. The one which i figured out is a 18US$ manual which ISO commetti provides for download. I ahd never seen a US$ as I live in India. I am working and studying along. This is hard way to do things when you sowrk for 14 hours on html and php and then tudy C/C++ or Computer Graphics without anybody explaining what the hell Bresenham line drawing algorithm is.

    DevC++ is a help for poor guys like me. As being a fool and I am not sure how the GCC is used on Lniux. (I do have Linux. )
    Kumar Chetan Sharma
    -----

    _SelfProcclaimedGuru
    Hire a LAMP guy.
    To err is human. To blame your computer for your mistakes is even more human, it is downright natural.
  28. #15
  29. /(bb|[^b]{2})/

    Join Date
    Nov 2001
    Location
    Somewhere in the great unknown
    Posts
    5,163
    Rep Power
    792
    Well, the users guide that came with TC++ is a pretty decent reference. It was made by boreland.
    Since you are a student you may want to check into getting student licenses for these packages. Most major tools that are for sale offer student licenses at a discount.
    Take for instance the Visual Studio 6. I got it from a college bookstore when I was persuing my AAS for under $200 US, which is a remarkable drop in price over the standard retail.

    As far as the gcc, I would recomment that you take a look at some of the makefiles that are in the source directory and build programs to fit like this and then you just type make in that directory, but for a small sample on compiling a simple script, try something like this:
    gcc -g helloworld.c
    gcc -o helloworld helloworld.o
    The first line creates the object file helloworld.o
    The second line creates the executable helloworld from the object helloworld.o
    Now, this is just a sample, usually compile lines are much more complex than this considering that you can build with or without debug code, include libraries and other options. Check out the man page for gcc.
Page 1 of 3 123 Last
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo