Pleb trying to learn c code and failing

So I wanted to start learning C and so I download a program called codeblock. I followed this website:cprogramming.com/code_blocks/ and i can't seem to run basic c code and i don't know what to do.....

Attached: 2019-02-12 (2).png (1920x1080, 311K)

Other urls found in this thread:

cprogramming.com/tutorial/c/lesson1.html
vim.org/
gnu.org/software/emacs/
distrowatch.com
docs.microsoft.com/en-us/windows/wsl/install-win10
repo.anaconda.com/archive/Anaconda3-2018.12-Windows-x86_64.exe
visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=15
visualstudio.microsoft.com/vs/features/cplusplus/
youtube.com/watch?v=KJgsSFOSQv0
youtube.com/watch?v=UILNmv2kFMc&list=PLCNJWVn9MJuPtPyljb-hewNfwEGES2oIW
sourceforge.net/projects/mingw-w64/files/Toolchains targetting Win32/Personal Builds/mingw-builds/installer/mingw-w64-install.exe/download
twitter.com/NSFWRedditVideo

Try just return(0), say what is the result

holy shit you're retarded, take a good look at the screenshot you posted again, get the fuck off my board if you don't figure it out yourself

I have spent three or four days on this issue with my own code. this was the one found on the site too:cprogramming.com/tutorial/c/lesson1.html

Attached: 2019-02-12 (5).png (1920x1080, 298K)

fuck dude... is it that obvious???

I would recommend learning C on linux with GCC. On windows you can now install a linux distro of choice to get access to the linux command line. C is a small enough language to learn with just vim or emacs. Follow through the "C Programming Language" book. Code Blocks is a bit overkill and is mostly used by C++ devs. If you don't know vim or emacs it is a good chance to learn, as they are essential tools.

vim:vim.org/
emacs:gnu.org/software/emacs/
linux distro:distrowatch.com

Are these the ones that you're recommending? I 'll try to install them and see what will happen

VOID MAIN ()

LPMQTRP void main()

did you forget to save the file...

I tried that on my own code but it didn't work then either

Attached: 2019-02-12 (6).png (1920x1080, 295K)

from the screenshot it looks like you are editing a file called "untitled1" and NOT "main.c" which is what is getting compiled.

saved this one and it still not running...

Attached: 2019-02-12 (8).png (1920x1080, 343K)

>*Untitled1
you need to edit main.c

main.c was my own code and it didn't work so i tried the code on the site. then i made untitiled1

Attached: 2019-02-12 (9).png (1920x1080, 294K)

I believe it is possible to install ubuntu from the windows store, then I think you can launch ubuntu to get a linux shell, then you can install and use vim and GCC.

You don't have to install the whole distro. Since you use Windows 10, just do the following: docs.microsoft.com/en-us/windows/wsl/install-win10 you only need a command line to compile C code in GCC and it should give you a good experience to develop programming logic. IDE's tend to be a bit tedious when dealing with low-level code and small programs that only require terminal I/O and text file R/W

>Documents\New folder (4)\Test\bin

looks like youve fucked up something and are probably editing the wrong main.c

Try compiling main.c on your own using GCC from the command line

Just go to the directory and try
gcc main.c -o test

it's all set somewhere in project options, I never used codeblocks though.
At the end what's being called is gcc on your file.
Honestly it would be easier to just use notepad++ and compile in console at the beginning, all that ide stuff adds lots of unnecessary complexity

Oh yeah forgot you're on wangblows, you'll have to jump through hoops to even use gcc

installing
only one there...
let me try to find it

Attached: 2019-02-12 (11).png (960x532, 27K)

Delete the fucking getchar, just leave return 0; , then compile again

Attached: 2019-02-12 (12).png (1920x1080, 300K)

...directory?
it install gcc when I install codeblock...

Did it add gcc to PATH? Ie. can you call gcc anywhere once you open cmd?
If so, open console (cmd.exe), navigate to the directory and execute gcc -o main.exe main.c

>code blocks
>windows
pajeet detected

#include
#include

void main (){
printf("Hola mundo \n \n");
getchar();
}

Download a linux VM and code in that environment.

Also buy K&R

I don't think I have it. I'll find a way to add it to PATH
Same error

hey christin

do I just add all of them?

Attached: Screenshot (2).png (1179x958, 112K)

that's scary
I can only find vehicle-related stuff when I search for K&R....

no add just the directory

K&R is C Programming Language 2nd Edition. A.K.A. "The C Bible"

Don't waste your time. Only people do who C are those who are heavily invested in the old infrastructure. Modern coders move to Python for pragmatic coding, C# for generic windows coding, C++ for ENTERPRISE and Java for crossplatform ENTERPRISE.

print "I am alive! Beware."

Attached: 2.7 btw.png (200x200, 8K)

add the directory but I can't open the thingamabob
thanks for that, I'll try and find it
I'll keep that in mind, what you recommend for a basic text-based game.

it may be easier in long term to use something like anaconda
repo.anaconda.com/archive/Anaconda3-2018.12-Windows-x86_64.exe
then after installation start writing 'anaconda' in start menu, open anaconda3 command line, then
conda install -c anaconda mingw
and now you have full linux-like console environment with python and gcc

HAHAHAHAHAHAHAHAHAHAHAHAHAHAAHAHHAHAHAHAHAHAAHAHAHAHAHAHAHAHHAHAHAHAHAAAHHAHAHAHAHA

Attached: 1548813066256.png (793x713, 1.13M)

First of all, nice double trips.

Second of all, you're retarded.

Python,C++,Java and C# are absolutely dogshit.

Python, Java and C# are all bloated to hell and slow as fuck. Sure they're relevant because with the rise of computational power that time/spacial complexity becomes less of an issue. But, no OS, device driver or mission critical system will ever be written in these languages because they suck donkey dick.

C++ is less bloated but Object Oriented programming is the birthplace of piss poor coding habits and is a breeding ground for spaghetti with shitty inheritance. C++ was supposed to be an upgraded version of C, but neglected to fix any of the prevailing problems and even added a truck load more on own.

C isnt perfect. But C, unlike most of the languages you mention, doesn't assume you're retarded. It gives you granular, precise ability with low time/spatial complexity.

Sure C is trumped on the TIOBE by Java, but the fact that C has been a perennial mainstay in the industry for this long is attributed to its versatility, strength and speed.

So OP, learn C. If not to program some of the fastest, leanest code in the world, then to learn amazing programming habits and become a better programmer in general.

One sentence is not a paragraph you fucking retard.

Attached: 1474007509225.png (469x540, 300K)

Just wanted to make it easier for autismos to read :)

Reddit pls go and stay go.

>recommend for basic text-based game
Python. Python for pragmatic programming, as I said before. If you want something done, go python. If you want something done the ENTERPRISE edition, go C++ or Java If you want something done on Windows only with windows gui, go C# with Visual Studio C#.

print(f'''{"I'm alive!" if alive else "I'm dead!"} {'Beware.' if alive else ''}''')

Attached: 3.7 btw.jpg (1051x1051, 46K)

Attached: vomit.jpg (188x282, 21K)

shit dude... I'm gonna leave this thread and try all this linux, ubuntu shit. thanks for the help all

Thanks pajeet. Heres your 5 rupees.

Attached: microsoft-logo-5.jpg (1200x900, 109K)

>alive is a bool
Nice try atheist!
You're not getting away with this one.

id say learn assembly before c. youre taking too big jump, learn the basics first

>f
what in the fuck is this?

>device driver or mission critical system will ever be written in these languages because they suck donkey dick.

NASA astronauts suit runs on Node.js, could this be considered mission critical?

have you tried
int main(int argc, char *argv[]) yet?

The problem is that you are using codeblocks. The first thing you need to learn when you start coding is not to use codeblocks or uninstall it if you already have.

If you want an easy and simple compiler just use Repl.it online.

jesus fucking christ what a shit thread
>retard can't get past lesson 1 of a C tutorial
>other retards start the "you're using the wrong ide/compiler/os/language" crucade

faggot

sweet get kid

Attached: lolol.jpg (1280x720, 134K)

hello fren... your repeating digits are way over the legal limit please come with us

Attached: 1523474819508.png (400x272, 68K)

fug man, i was going to post "CNILES BTFO" with satania

Attached: 1549984629272.png (900x1200, 695K)

Is this the end of CodeBlocks forever?

Lot's of alcohol.

I'm sorry for you, because you came to the wrong place to ask for help

Ah bloo blood bloo

fflush(stdout);?

most of the other anons' suggestions are right.
Your code is prefectly fine, but that Untitled1 file isn't shown under the Projects sidebar there. My guess is that codeblocks isn't picking up the file. What is it compiling and trying to run? who the fuck knows.
You're a beginner, it's going to be hard to differentiate between you fucking up, and your IDE fucking up.
Get rid of the IDE, use a simple text editor and just call gcc from the terminal. If you don't want to go to Linux, Kate is a simple GUI text editor that will get the job done for you perfectly well, and it is windows-friendly.

so what? its 2019 and you cannot do anything interested with C, or it takes to much of a time. You can also use pointers in C++ or C#, not need to torture yourself with primitive language without good modern environment

Checked

Install MinGW distro from nuwen.net (do not forget to run add to the path bat file)

Use gcc via cmd to compile

gcc main.c -o main.exe

/thread

Why not just use MSYS2?

This Status 4258096 is a codeblocks error that means it couldn't find the file to execute.
Meaning either it utterly failed as a basic bitch compiler or your AV ate your homework.

The problem is you named your function "main". This implies the function is more valuable than other functions and is problematic for historically disparaged functions who are still systematically oppressed today.

>c code
tranny

Download this OP, you'll improve your experience writing C/C++ tenfold: visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=15

>6 GiB for an Compiler / Debugger / Text Editor
no thanks.

>69
>777777
Holy shit codeblocks brainlets btfo

Attached: 2019-02-13-13-07-22.jpg (602x481, 47K)

Dont do this

Attached: 1548528980692.jpg (380x478, 39K)

Where you able to fix it user?

return 0;

Dude, I have no idea why people are recommending linux, vim/emacs and shit when you are struggling with very very basic things. Start simple. Get an editor (preferably something thats easy to use e.x. Notepad++ ) and a compiler. For the compiler, just google 'MinGW download' and install, should be pretty straight forward. Add its bin folder to your path(there are many tutorials for this) and check if it works by opening a NEW cmd window and simply typing 'gcc' if it complains about such a command not being found, that means you did something wrong, otherwise you should get a half red message complaining about no input files. After all the setup-ing is done, go on and create a new folder whereever you like. This is where you will store all of your c/c++ projects. Create a new folder inside it and name it test or whatever. Go inside, create main.c and write everything you already have inside it. Now simply open cmd within the existing folder and type in this command 'gcc main.c -o main.exe && start cmd.exe /K main'. The -o indicates the filename for the output file, the && is used to chain commands and the start cmd /K thing essentially means to start the file and not close the window after the program finishes. Now rince and repeat. This is the most basic way to start learning c or c++. Later on, you will most likely want to start using something like VSCode to ease development. Keep in mind that it will require some more setup-ing so have patience. Anyways, good luck on your coding journey!

checked+noticed+witnessed

Rust is the future, download clion+intellij-rust

codeblocks is done forever

Try including conio.h

do you know any other languages? if you dont, starting with c is not smart, start with something higher level. While I dislike python its pretty good for beginners

i see 2 problems
>windows + mingw
if you want to learn C use unix + gcc it's 100% easier and fast
>code blocks
i believe that IDE is outdated and also i won't recommend using IDE to learn language because mostly you only play with 1 or more files not a project, use editor you like and console

If you're on Windows, just bite the fucking bullet and use mvsc.

>my board
You're a cunt

>wintoddlers

Don't use an IDE. They are almost always trash.

Python 2... gross

Jesus fucking christ man...

Don't use Codeblocks. Use Visual Studio, that takes care of all the annoying and gives you a compiler which works, it's continuously updated also has working template files and so forth. Always use visual studio in windows, and gcc/c++ in linux. If you wish to do another IDE you can still use their compiler to compile the exe's, if interested google around a little but it doesn't matter if you just want to get it working.

Here: visualstudio.microsoft.com/vs/features/cplusplus/

Uninstall all your previous shit which might have fucked something up. Do a clean install on the computer in worst case. Then install visual studio from there while having an updated computer, click stuff slowly, read carefully and it'll work.

youtube.com/watch?v=KJgsSFOSQv0

If you need up to date tutorials: use youtube. Here's a guide from 2018, haven't checked it out, but it sure as dillyballs is better than what you're currently trying.

There is literally nothing wrong with it.

its a bit slow but a good tuto
youtube.com/watch?v=UILNmv2kFMc&list=PLCNJWVn9MJuPtPyljb-hewNfwEGES2oIW

actually, very literally. python 2 has annoying string handling. even js is better than that.

>Visual Studio
>Visual C++
actually disgusting
if you want to use C++ just do it on linux using g++

"we are gonna look at some advanced stuff like: ifs, loops ..." kekd

>windows
>codeblocks
>discord
>windows mail
>onedrive
>avg
>laptop
>no adblocker
>posts his name on Jow Forums
This retard is literally underage, begging for tech help and all of these reddit faggots are trying to help him.
If he's too dumb to press two keys on his keyboard he shouldn't be on this board.
FUUUUUCCKKKK OFFFFFFFFFFF REEEEDDDDIIIITTTTTTTTTTTT

Attached: rope.jpg (1536x1092, 154K)

where's crack?

Reminder that you do not need code editor or IDEs or anything like that to start toying with programming languages.

Code::Blocks seems like a decent IDE specially for beginners, I have no idea why your code isn't running.

sourceforge.net/projects/mingw-w64/files/Toolchains targetting Win32/Personal Builds/mingw-builds/installer/mingw-w64-install.exe/download

Attached: GCC.jpg (1184x512, 87K)

>filename is "Undefined"
>it's not even saved
nice try retard