Ask Experts Questions for FREE Help !
Ask
    vague's Avatar
    vague Posts: 1, Reputation: 1
    New Member
     
    #1

    Mar 13, 2007, 10:47 AM
    Programming delama
    Hi, my question doesn't exactly include c++, its just I'm at my second year of collage majoring business information systems and I'm having a problem that I know how to write a code in c++ but still I can't really correct my errors , in other words I program using ideas not programming languages so please if you can help me please reply
    asterisk_man's Avatar
    asterisk_man Posts: 476, Reputation: 32
    Full Member
     
    #2

    Mar 13, 2007, 11:31 AM
    So you write code that looks good to you but the compiler spits out errors and you can not recognize what is wrong with your code based on those errors?

    Four things I would suggest
    #1: pay closer attention to syntax as you write your code. If you're not sure of the syntax for a command look it up instead of guessing. Don't just write code and hope the compiler will fix your problems. That clearly isn't working and it may lead to code that is syntactically correct but logically wrong

    #2: you need to learn more about what the compiler is doing. Somewhere in your textbooks it probably describes the steps of compilation. You need to become familiar with what is happening during preprocessing, compilation, and linking. You shouldn't just be running the compiler blindly without knowing what is going on.

    #3: ask questions when you don't know what is going wrong. There will probably be a few students who understand the subject better than you do or have already seen the error you're looking at. Work with others as a team (but do your own work and don't rely on them too heavily). You can also post questions here. We'll definitely help you debug compile errors and logic errors. Post plenty of data though, include your source code (preferably with line numbers) and all of the important parts of the compile log.

    #4: since you are better with the ideas try to focus on that first. Write your program in english or short hand first. Focus on what you want to do, not how. This is called pseudocode and for any task of moderate complexity or above it should always be used. After you know what you want your program to do you can put your syntax hat on and focus on creating a proper c++ program without getting hung up on the logic.

    Don't get discouraged! No one picks it up overnight. Keep practicing and you will improve.

    If you have any other questions or comments feel free to post them!
    moncoeurdor's Avatar
    moncoeurdor Posts: 4, Reputation: 1
    New Member
     
    #3

    Sep 21, 2007, 11:44 PM
    Quote Originally Posted by vague
    hi, my question doesnt exactly include c++, its just i'm at my second year of collage majoring business information systems and i'm having a problem that i know how to write a code in c++ but still i can't really correct my errors , in other words i program using ideas not programming languages so please if you can help me please reply
    When you compile or build your program, always start with the very first compiler error listed. Remember that one error could cause many listed compiler errors with only the first listed compiler error valid.

    To get an idea of which compiler errors mean what, Write a simple program
    and deliberately insert an error. Then build it and note the compiler error messages that appear.

    For example:

    main (void)
    {
    int I
    I = 5;
    }

    The semicolon is deliberately left out.

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

C programming [ 2 Answers ]

I'll be extremely thankful if u could provide me with a c program that convert a given nfa to dfa

C programming [ 2 Answers ]

I need some help from you regarding a particular problem. I am using libnet raw packet library (libnet_build_ethernet) for transferring data over the network. For this, I have to first convert all the data to u_char type and then serialize them to contiguous memory locations. Can...

Qt programming [ 1 Answers ]

Hi, My name is anshahmed.I am doing final year B.TECH.Now I am doing a project and I want to use qt programming .Whie I was compiling the qt programm the compiler giving errors in header file(qpplicaton.h) .how can I compile the qt programm.

Computer programming [ 2 Answers ]

How do yeah teach a computer the meaning of nothing?

C programming help [ 1 Answers ]

Hi people I want to shut down my system after a specified time I want to use the time() method but I need to know the exe file that runs after the specified time. Please let me know also if there is any other way to shut down my system after some particular time Thank you Best regards


View more questions Search