Week 2
Whats the fuss with C++?
Today we dived straight into learning the C++ language. Being a computer science student, I thought this would be very similar to Java as they are both object oriented languages. Boy was I wrong. C++ handles memory allocation very differently to Java. Developers manage memory allocation in C++ using pointers whereas in Java this is not needed. I don’t understand pointers at all! This is the part that is quite confusing to understand but I will not give up until its “ingrained in the membrane”. It’s fun to learn a new language when familiar with another because I can compare and understand their differences. For now we basically went over the basic syntax of C++ and how to print Hello World and a shopping list on to the console.
int main() { std::cout << "Hello World this " << "is " << "Syema " << "we need:" << std::endl; // Prints out hello world, my name and a shopping list std::cout << "Milk" << std::endl; std::cout << "Eggs" << std::endl; std::cout << "Bread" << std::endl; }
Lunch was great. I learned more about the students and their backgrounds. Its nice to know we have such a diverse group of students to work alongside with. I’m looking forward to learn more about them in the coming weeks.
Great use of C++! we could use this for our shopping list.