Thread: What's wrong with this C code?

  1. #1
    Registered User
    Join Date
    Apr 2020
    Posts
    1

    What's wrong with this C code?

    Hey all I am a beginner who has decided Insteaded of watching tutorials for years on end to get started Into It. It's been along time since I knew what programming Is and I haven't built anything stuff It I'll dive right In.

    I guess learning how things work and tampering with code Is a good way to learn. Pilots In WW2 that shot down other planes use to capture spy planes they shot down and get engineers to take It apart and put It back together again to see how It worked same principal. I'm learning by trial and error and tampering.

    This Is the website I used for a basic C language Calculator.

    C Code for Calculator Application | Learn C Program | Fresh2Refresh .com

    I copied It edited out comments and unesscessary parts and then just saved and It In CodeBlocks.

    Keep In mind I am a noob and I thought source code was the main thing just type It In and Boom.

    I copied It saved and ran It.

    Also how would I setup Codeblocks properly?

    Would any C language novices lend a hand?

  2. #2
    Registered User
    Join Date
    Aug 2019
    Location
    inside a singularity
    Posts
    308
    Well, what is your question? You gave us some good knowledge in history but forgot to state your problem. You pasted the code, removed the comments, saved it into your project in CB, and ran it. This is what you've said. Now, what? You were not able to run it? CB didn't detect compiler installation? Code didn't compile? You've got a bunch of error messages you don't know how to fix? What?

    > Keep In mind I am a noob and I thought source code was the main thing just type It In and Boom.

    Yes, source code is the main thing. After the compiler. If you've set your compiler correctly, and created your CB project correctly, it'll run.

    > I am a beginner who has decided Insteaded of watching tutorials for years on end to get started Into It

    Beginner? I'm afraid you're wrong about yourself. You must be a pro if you've been watching tutorials for years, no?

    >
    Also how would I setup Codeblocks properly?

    The default setup is the best for beginners. The only thing you need to do yourself is maybe fix the compiler (and debugger) installation directory yourself in CB > Settings > Compiler > Toolchain executables (and CB > Settings > Debugger > Default)
    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook, The Wizardry Compiled

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Can someone please tell me what is wrong with this code?
    By cloudstrife910 in forum C++ Programming
    Replies: 7
    Last Post: 10-23-2010, 04:17 AM
  2. What is wrong with my code?
    By miller1737 in forum C++ Programming
    Replies: 2
    Last Post: 01-22-2010, 05:34 PM
  3. What is wrong with my code?
    By dakarn in forum C Programming
    Replies: 6
    Last Post: 10-14-2008, 05:16 AM
  4. { What's wrong with my code ? }
    By meili100 in forum C++ Programming
    Replies: 8
    Last Post: 12-15-2007, 12:05 PM
  5. What is wrong with this code!!!
    By Troll_King in forum C Programming
    Replies: 9
    Last Post: 10-18-2001, 05:06 AM

Tags for this Thread