They both committed mistakes on the easy C language. Just as I'm taking my initial programming classes not only do I check if I committed mistakes, like, 3 to 5 times but I also ask the teacher if I have done goofed. I'm using a beginners program called Code Blocks which let's you program on various programming languages, I really recommend it
Hers could be valid JavaScript though, where the semicolon is not enforced. His wouldn't compile even with the missing paren because he's using the correct quotes (I assume autocorrect replaced them) instead of the simple ones (the left ones in the top grey box here: en.wikipedia.org/wiki/Quotation_mark). The things you learn when you copy and paste code ;)
All the best to your C endeavours!
Double quotes are perfectly fine tho.
char* mystring = "hello, world";
is valid in C (pretty sure, havent used C in a while), definitely valid in C++.
And the '.add(...)' indicates an object oriented language, so most definitely not C.
Also @awake_ash , C is NOT an easy language. Far from it. Good luck on your classes :)
@poopun: I don't mean double vs single quotes, I mean the quotes are not straight: they need to be Unicode character 22 but are 201C and 201D: www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
All the best to your C endeavours!
char* mystring = "hello, world";
is valid in C (pretty sure, havent used C in a while), definitely valid in C++.
And the '.add(...)' indicates an object oriented language, so most definitely not C.
Also @awake_ash , C is NOT an easy language. Far from it. Good luck on your classes :)