Jump to content

Super frustrated trying to learn C++ coming from Java.

Remixt

Well, I think I'm screwed guys. I transferred to a new school and got put smack dab in the middle of an intermediate programming class. This wouldn't normally be an issue, but I turned in my first program and got a 50/100 because my code was in Java instead of C++. My professor says any programs turned in written in the "wrong" language will result in a 0 from now on. Apparently they don't learn java at my current school and everyone else only knows C and C++. 

 

Long story short I need to learn C++ extremely fast. I'm in a a mid level class and the lectures are mentioning things I've got no idea about. My professor says that we aren't allowed to use the STL in this class and that resulted in groans, but I don't even know what that means!!! AHHHH

CPU: Ryzen 5950X Ram: Corsair Vengeance 32GB DDR4 3600 CL14 | Graphics: GIGABYTE GAMING OC RTX 3090 |  Mobo: GIGABYTE B550 AORUS MASTER | Storage: SEAGATE FIRECUDA 520 2TB PSU: Be Quiet! Dark Power Pro 12 - 1500W | Monitor: Acer Predator XB271HU & LG C1

 

Link to comment
Share on other sites

Link to post
Share on other sites

I think it would make more sense to talk to the professor about it. If he/she knew you were transferring from another school, I don't understand why they would give you a 50 for the wrong language if they didn't explain that before.

Hes rated very poorly on ratemyprofessor, I'm not really surprised.

CPU: Ryzen 5950X Ram: Corsair Vengeance 32GB DDR4 3600 CL14 | Graphics: GIGABYTE GAMING OC RTX 3090 |  Mobo: GIGABYTE B550 AORUS MASTER | Storage: SEAGATE FIRECUDA 520 2TB PSU: Be Quiet! Dark Power Pro 12 - 1500W | Monitor: Acer Predator XB271HU & LG C1

 

Link to comment
Share on other sites

Link to post
Share on other sites

Looks like you'll either need to swap/drop the class or something, unless you can in the next couple weeks learn c++

 

Speak to your professor and explain the situation, perhaps you can work something out.

Updated 2021 Desktop || 3700x || Asus x570 Tuf Gaming || 32gb Predator 3200mhz || 2080s XC Ultra || MSI 1440p144hz || DT990 + HD660 || GoXLR + ifi Zen Can || Avermedia Livestreamer 513 ||

New Home Dedicated Game Server || Xeon E5 2630Lv3 || 16gb 2333mhz ddr4 ECC || 2tb Sata SSD || 8tb Nas HDD || Radeon 6450 1g display adapter ||

Link to comment
Share on other sites

Link to post
Share on other sites

My professor says that we aren't allowed to use the STL in this class and that resulted in groans...

 

Standard Template Library (STL), take a look at it detailed here.

 

but I don't even know what that means!!! AHHHH

 

Your professor probably wants you to do everything manually. I suspect that this is in order to gain an appreciation for how things work in a fundamental sense i.e. linked lists, queues and so on.

The single biggest problem in communication is the illusion that it has taken place.

Link to comment
Share on other sites

Link to post
Share on other sites

Well, I think I'm screwed guys. I transferred to a new school and got put smack dab in the middle of an intermediate programming class. This wouldn't normally be an issue, but I turned in my first program and got a 50/100 because my code was in Java instead of C++. My professor says any programs turned in written in the "wrong" language will result in a 0 from now on. Apparently they don't learn java at my current school and everyone else only knows C and C++. 

 

Long story short I need to learn C++ extremely fast. I'm in a a mid level class and the lectures are mentioning things I've got no idea about. My professor says that we aren't allowed to use the STL in this class and that resulted in groans, but I don't even know what that means!!! AHHHH

so i sort of got dumped into the same situation. only instead of C++ it was C#. however i took a step backward and did the basic OOP class which is done in C++. so far (only been few weeks) i have been doing pretty well. my point here really is consider going back to say CS 2 and start from there. sure it might look weird and feel weird but it will give you a much easier introduction to the languages. or you can attempt to learn C++ as fast as possible and hope for the best. hey maybe that can be a topic for techquickie. @LinusTech yeah? C++ for a techquickie episode. maybe it has already been done. idk. whatever moving on to my other homework. hope you survive school!

Link to comment
Share on other sites

Link to post
Share on other sites

The biggest difference in C++ is memory management. In Java the VM handles it but in C++ it's your responsibility, so make sure to write destructors for your classes. In C++ you have pointers which are a lot like references in Java, except that you have to dereference a pointer in C++ to get the data it points to while in Java you automatically dereference. Then C++ has something completely different called references, which don't behave as pointers of Java references. They're just aliases, or other names, for a piece of data. For instance, a lot of times you'll want to pass a data structure by reference to a function so you can modify it. E.g.,

void sort(vector<int>& v){   // code to do the sort}

You also have multiple inhertiance in C++, whereas in Java you could only have a limited form of multiple inheritance where you could implement different interfaces in addition to deriving from one base class, but I doubt you're going to see much of that in a lower division programming course.

Link to comment
Share on other sites

Link to post
Share on other sites

C++ Primer by Lippman is my favorite C++ book for anyone who already knows how to program. And you can buy it for $1.99 lol.

 

http://www.barnesandnoble.com/p/c-primer-stanley-b-lippman/1117443574/2672260391563?st=PLA&sid=BNB_DRS_Marketplace+Shopping+Textbooks_00000000&2sid=Google_&sourceId=PLGoP20436&k_clickid=3x20436

Link to comment
Share on other sites

Link to post
Share on other sites

  • 2 weeks later...

When i came from school doing hava for 3 years i whent to collage and got droped into c++ and for me it was not that hard but i would say go on youtube and go look up just the basics on c++ i its a easier language then java for me depending what you want to do ofc gui for c++ is really much wores then java but the basics are easier.

Needs Update

Link to comment
Share on other sites

Link to post
Share on other sites

I recommend "Problem Solving with C++" by Walter Savitch. I used it when I took my programming series that was in C++.

Delltopia

Case & Mobo: Stock Dell Optiplex 7010, CPU: i5 3470, RAM: 16gb 1333 DDR3 (1x8gb Corsair Vengence, 2x4gb Random), GPU: Diamond Radeon HD 7970,

PSU: EVGA GQ 650W, SSD: Kingston v300 128gb (OS), HDD: 700gb Seagate 7200rpm (Storage)

Link to comment
Share on other sites

Link to post
Share on other sites

I feel the same way. What has helped me transition from Java was just practicing other than doing homework and mini projects. The more practice I got, the more I got used to a C++ program's structure and its syntax. Eventually I think you will be able to see how Java and C++ are similar, and your grade will increase.

Link to comment
Share on other sites

Link to post
Share on other sites

Add me on Skype (same name). I am going to learn C++ too, and we can help each other!

 

I have 8 years of prior programming experience, so my experience might make it easier for you. :)

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×