+ 2

SoloLearn VS CodeCademy

Hi i want to ask about C++ lesson i try another Web and find different courses in solo learn and codecademy when i go to codecademy in the proggram i start with Codecademy= #iclude <iostream> int main() { std::cout <<"hello world"; } but in SoloLearn= #include <iostream> using namespace std; int main() { cout << "hello world"; return 0; } and both work but i'm very confused right now Can someone explain? (sorry if my english so bad i'm just learning english 2weak's ago) https://code.sololearn.com/cMOm3D6L4Egz/?ref=app https://code.sololearn.com/cv7291NaD856/?ref=app

26th Jun 2020, 2:41 AM
Thera Resioleisera
4 Antworten
+ 4
Codecademy is using the scope resolution operator to access cout from the std namespace. SoloLearn is importing the entire std namespace into the current namespace. From what I've been reading, this is bad practice. Something about it possibly causing conflict with identifiers.
26th Jun 2020, 3:12 AM
♡Addy♡
♡Addy♡ - avatar
+ 2
Thera Resioleisera Sololearn is totally free while Codecademy asks you to get a pro version for money. Sololearn has an app for mobile devices, which is a big advantage. -Lastly, Sololearn provides you a logbook (or something) to save your codes. On the other hand, Codecademy is widespread and well-known among software world.
26th Jun 2020, 3:52 AM
Amberk Jillian
Amberk Jillian - avatar
+ 1
As a Sololearn learner, should I try Codeacademy?
26th Jun 2020, 12:35 PM
Kevin H.
Kevin H.  - avatar
0
yes
25th Jun 2023, 4:38 PM
Ehan Tarique
Ehan Tarique - avatar