r/CodingForBeginners • • 5d ago

Day 5 of learning C++(first program)

Post image

Today , i finally completed my 1st module on learncpp.com

Learnt literals , operators , expressions made two programs(only took ss of one Program)(and yeah I added new line character afterwards)

Well as I know some coding so it was pretty easy

Tbh the hardest part was to figure out what CMakeList is in CLion

Spend more time in figuring and setting that up rather than coding

+ If anyone know how to like automatically add executable in CMakeList rather than adding manually , well adding manually is not a problem tho but still

Tomorrow will be hectic day(college assignments and practicals) still will try to do some coding.

100 Upvotes

17 comments sorted by

View all comments

1

u/Psilocybe_Fanaticus 5d ago

Why are you using std::cout when you are already using “using namespace std”?

1

u/samosa285 5d ago

Tbh I didn't know about what using namespace std does I was just messing around

1

u/Psilocybe_Fanaticus 4d ago

It pretty much removes the need to type std::cout
If you use multiple libraries (in the future), do not use this. Always write it out and completely omit “using workspace std”

1

u/samosa285 4d ago

Ohkiee