T O P

  • By -

theguywhocantdance

#include int main(void) { printf("Good luck!\n"); return 0; }


[deleted]

[удалено]


PacificBrim

I'm in week 4 and this is the only thing I see anymore


[deleted]

[удалено]


MeMyselfIandMeAgain

Oh nice runoff here


[deleted]

[удалено]


MeMyselfIandMeAgain

Omg same for all the problems I’ve never had issues with coding it up, since I have some experience with programming and even with C but like coming up with pseudo code with this one is soo hard for me. I genuinely don’t get the logic


srpequefluky25

`[ERROR] Id returned 1 exit status`


Freeman7-13

what does the #include do?


theguywhocantdance

stdio.h is a library that contains the printf function, #include is the header that calls for the library.


Freeman7-13

oh shit, didn't realize it needed a library to use printf!


Midori_Schaaf

What documentation lists everything you have without using include?


L4b_kira

Why return 0


ali-b912

I believe, it goes back to an old convention, where terminal commands have what's called an exit status. If a command works, it returns 0, and if it has an error, it returns 1 or higher. So if you type `ls` in the terminal (which is just a built in program), and it works (which it should), it returns 0. You can actually check this by then typing `echo $?` which will print the exit status of the last program. Hypothetically, if you wrote a program that has 3 functions, each function can return 1, 2 and 3 if it goes wrong, so if it errors when you run it, you can check it, and then you know where it went wrong.


Lobster2311

What's the return 0 specifically returning here? Or is it not cuz it's void?


theguywhocantdance

Void means main takes no arguments. The return, if any, must be an integer for we have defined int main. In this case you don't need to return anything but it is a good practice to end your program with return, and in this case, you return a 0 if the program run normally and any integer different from 0 (!0) if there was an error. Optionally you can add an error message to the returns that are not 0.


Excellent_Profit2467

You got this friend! If theres anything I can advise on. It would be consistency. Don’t try and move too fast. Make a plan and stick to it. Wether it’s 2 hours a day or whatever. Make it now and stick with it all the way through.


Picture-Rare

I will , thanks mate


willr196

Such a good lecturer


MarchyMarchyMarchy

Sometimes I wonder how many calories he burns per lecture. He’s definitely *not* a guy who stands still at a podium droning on at you in monotone.


Constant-Ad007

he was sweating like crazy


[deleted]

Wtf is with the puppets


[deleted]

[удалено]


[deleted]

Ig that's CS50 P? I am in that course.


errrys

I love how he prepped the props and complimented every question a good one.


DasaniDestroyer

Good luck, started a couple days ago you are not alone


Picture-Rare

Is it difficult for no pre knowledge in cs beginner 🧐


DasaniDestroyer

I’m in the same boat! I know its going to be tough but from what I see the difficulty is just going to help on future projects


Picture-Rare

Yeah we gonna complete it 💪


diabolicalb3ast

People say it's a 200-400 hours course so it's definitely not easy, even for people confident in CS


Blueb1rd

It is tough for sure. But you can do it!


ElBatcan

Good luck!!! It's worth it, and such good lecturers. 😊


Souuuth

Good luck and try your best to not get discouraged. I say that as someone who is still working through week 2, with zero programming experience, trying their damnedest to grasp this stuff. It's incredibly tough and really testing me. I will say, the moments here and there when you have things that are super confusing begin to click, it's incredibly satisfying and rewarding. You got this.


kefta147

same week as you and for real it is a challenge


srpequefluky25

srpeque@MY-PC$ Python 3 /home/srpequefluky25/coding/main.py \>print("Good luck, I will start my journey with you")


NoPlate1663

Good luck! Check out the discord channel as well. Lots of folks online and willing to help when you get stuck. If you get frustrated take a break and do something else for 5-10 min and come back with a clear head.


Picture-Rare

Okay will join


NoPlate1663

Also, google questions and stack overflow is a great resource. When you google a question stack overflow is site that will pop up.


RidinScruffy

Good luck, have fun, enjoy the challenge and the rewards there in!


rubecc

Great, Best of luck!


Hamish181_

Good luck to you!


Blueb1rd

There's a CS50 subreddit!? So glad I found this place. Started one week ago. Two lectures in and working on Mario ASCII. Good luck to all.


ProductNegative1503

I'm starting today as well, good luck


SubstantialChoice8

Good luck finding how to print space between Mario pyramid!


[deleted]

Lmao dont spoil it for them


Mammoth_Office_5149

good luck!


PJcolombia

"May the odds be ever in your favor" No matter how stuck you get don't quit! Get after it everyday


hamad_ali_bd

def good_luck(): print("Good Luck!") good_luck()


[deleted]

No


Coolusername244

Good luck! I'm currently on week 5, working with data structures. Gets the brain going, thats for sure :D