+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: C/C++ frequently asked questions

  1. #1
    v0id is offline Retired
    Join Date
    Apr 2007
    Posts
    2,937
    Blog Entries
    3
    Rep Power
    42

    C/C++ frequently asked questions

    Before posting make sure to read the FAQ, and be sure to follow its rules as well.

    This thread is meant as another FAQ which is specialized in this forum, the C/C++ forum, particular, and the languages themselves. If you read this before creating a thread or a post you may avoid asking already frequently asked questions.



    I want to learn C/C++, what do I do?
    Both C and C++ are so-called compiled languages. That means that programs written in C or C++ will be translated directly into machine code, which can be read directly by your operating system. This translation consists of three steps: compiling, assembling and linking. The compiling process is where the sourcecode is translated into the Assembly programming language by a compiler. The assembling process is where the new Assembly code is translated into machine code by an assembler. The last process, the linking process, is where external libraries are linked onto or included in the program, depending on if it's a dynamic or static library, using a linker.
    These are the basic tools for every C/C++ programmer. There's a long range of other tools besides the basic ones. These tools are usually more specialized in specific tasks, like a profiler for optimization, a debugger for debugging or an IDE for easily management of sourcecode and compiling process.
    When you have the tools you only need to learn the language. This can be done in multiple ways. One can learn a lot completely free directly from the internet, and from this knowledge achieved from the internet being able to create beautiful applications. If you don't mind paying some cash, or need in-depth information, one of the best choices is to get your hands on a book. Books will normally go more into details, than most websites will.
    The best choice is to join a programming-class or course. In this way you'll be able to ask your teacher the questions you have on mind, and try out new stuff in a positive environment


    How do I make a driver? ...
    ... and other questions alike can be hard for us to answer, if you're not providing some information about your system. You must always keep in mind that systems are different, and the same code may not work on all systems.
    A question like, "How do I make a driver?", is is only a good question if you give us some information about your system. Drivers are very different from operating system to operating system, so we need to know which operating system you are using, so that we can fix a solution which fits you. The same goes for many other so-called platform-dependent questions.
    If you are not sure whether it's a platform-dependent question, then just give us the information anyway. Then you're on the secure side, and you don't have to worry about whether we know what you're talking about or not.


    Is it okay to use conio.h? ...
    ... and questions alike regarding platform-dependent libraries are not really questions for us, but more for yourself. You must consider whether you will use a platform-dependent library or not. The advantage of platform-dependent libraries is that it may have more specialized functionality for your system, or environment, than a platform-independent library, and thus will you have more possibilities. The disadvantage is obviously, that platform-dependent libraries do only run on the system or environment it is made for, so it will not run on other systems. You should especially keep this in mind, if you're thinking about making commercial applications.


    Is this tool better than that tool?
    This is mostly a matter of taste. Different people prefer different tools: maybe because it's faster; maybe because it's easier to use; maybe because it looks good; etc. So, if you're asking such question you must be prepared to get many different replies, which all states different things.
    Investigating and collecting information about different tools is a better solution. In that way you learn about the different tools, and you also find out whether they fit you or not. If you finally end up with two or maybe three tools, and cannot choose, then you can go to the forums and ask us for our opinion. In that way you will get specific replies to the tools you're considering, and not some tools you don't even know about.



    You can find a list of tools, books, websites, and other general resources for C/C++ in the C/C++ resource thread.
    Last edited by v0id; 08-05-2008 at 11:08 PM.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    patatas is offline Newbie
    Join Date
    Jan 2009
    Posts
    1
    Rep Power
    0

    Re: C/C++ frequently asked questions

    Cool stuff here. I have a big project in mind, i will be on touch

  4. #3
    wiwbiz's Avatar
    wiwbiz is offline Learning Programmer
    Join Date
    Dec 2008
    Posts
    66
    Rep Power
    0

    How's this code working ??

    Code:
    #include <iostream>
    using namespace std;
    int main(void) {
    char c, d=1;
    while(std::cin.get(c) && (c!='2' || d!='4') && std::cout.put(d))
    d=c;
    cin.get();
    cin.ignore();
    }
    Last edited by WingedPanther; 03-06-2009 at 08:33 AM. Reason: add code tags (the # button)

  5. #4
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143

    Re: C/C++ frequently asked questions

    It really depends on your implementation. In generally, you will probably want a special class to handle that, such as the GNU BigNum library.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  6. #5
    Join Date
    Mar 2009
    Posts
    7
    Rep Power
    0

    Re: C/C++ frequently asked questions

    Yes, You can develop a driver software for your hard ware but you need good practice because their requirements vary from operating system to operating system. It is very flexible and good language to work at lower level but you should have strong logics.

  7. #6
    neigma34 is offline Newbie
    Join Date
    Aug 2008
    Posts
    3
    Rep Power
    0

    Re: C/C++ frequently asked questions

    can anybody tell me how to improve my programming skills.

  8. #7
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143

    Re: C/C++ frequently asked questions

    neigma: read code, write code, debug code.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  9. #8
    neigma34 is offline Newbie
    Join Date
    Aug 2008
    Posts
    3
    Rep Power
    0

    Smile Re: C/C++ frequently asked questions

    thanxx, for help.


  10. #9
    Edogaa is offline Newbie
    Join Date
    Dec 2009
    Posts
    17
    Rep Power
    0

    Re: C/C++ frequently asked questions

    Alright, this is gonna be a bit tough to ask


    So, what the heck is the IDE, Compiler, and assembler?

    At first, since when I took classes I thought the IDE was the same as the compiler or something (Visual Studio's), then I got on linux and downloaded an IDE, and noticed GCC is completely seperate so I wondered if it was a graphical frontend for the compiler. Now I'm not even sure?

    On another note I don't exactly know how to program just yet, I can read some of the code, but not exactly understand it fully. I'd like to learn how to program just for the sake of it really, I wouldn't wanted to be limited to one thing. I occasionally want to learn some game programming, but not limit myself to that one thing since it doesn't seem like fun to stick toprogramming to that one thing only. :/

    I haven't had much time to refine my skills with school and all sadly. At least not after that semester ended. All we learned to do was go on visual studio's and code random little things that pop-up on screen with random answers to arithmetic problems. Not sure if that makes sense but even if I learned how to read it I didn't feel like I learned much. :/ The book did give me some ideas on how to look at it more so, so which way could I move from here?


    Sorry for all the noobish questions, but I kept getting confused by a lot of this. I know its not necessary to know exactly what everything is but I also to be incredibly curious to the point where I Would irritate myself if I Don't know for sure.

    Heck I'm not even 100% what a function and class are (albeit I Have some idea, but haven't had the time to look into it with classes, stress, and stuff, I finally have time now that this semester is over though!).

  11. #10
    Join Date
    Nov 2009
    Location
    I seem to be lost...
    Posts
    1,566
    Blog Entries
    1
    Rep Power
    22

    Re: C/C++ frequently asked questions

    This tells you what a IDE is and a compiler here I couldn't find any thing on assembler though.
    Knowledge: Intermediate C#, Beginner AS3, HTML, CSS, Binary, Hex, Octal.
    Science is only an educated theory, which we cannot disprove.

+ Reply to Thread
Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. PHP Guide: Fequently Asked Questions
    By Alexander in forum PHP Development
    Replies: 9
    Last Post: 01-31-2012, 11:14 PM
  2. Python frequently asked questions
    By v0id in forum Python
    Replies: 2
    Last Post: 12-05-2010, 10:30 AM
  3. please read and help me with the few questions i have asked
    By hathaway919 in forum C# Programming
    Replies: 1
    Last Post: 06-28-2010, 12:08 PM
  4. Mine less asked questions
    By asafe in forum C and C++
    Replies: 2
    Last Post: 09-26-2009, 02:42 PM
  5. The less asked questions
    By ZekeDragon in forum C and C++
    Replies: 26
    Last Post: 09-26-2009, 01:07 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts