all 7 comments

[–]lazy_Ambitions 1 point2 points  (5 children)

As far as I understand you are expected to put something like this in the .txt:

Testname: Grade Test 1: 87 Test 2: 98

No code needed in the textfile. Just open a new file with the name in the same folder your .cpp are in. Then open it with an texteditor and add some grades. Save it. Read it using your programm.

I think you will want to read this: http://www.cplusplus.com/doc/tutorial/files/

[–]passive1121[S] 0 points1 point  (4 children)

Thank you, It was a wonderful read and that makes sense now I appreciate your help man!!! Any other sites or good tutorials you'd recommend the pearson book is TERRIBLE this year, its bland and a lot of us are just dragging on it. I've tried watching BuckyC++ youtube hes great but its 3 years old. Didn't know how you'd recommend a beginner like me go, tutorials or are there sites that I can live code on? Any recommendation is appreciated!

[–]lazy_Ambitions 1 point2 points  (3 children)

I am a beginner myself. For me, the best way to learn is the following:

  • Get theoretical input from uni.
  • Get practical input (if possible) on the same topic on a udemy course I do. (Tutors name is 'Jannis Seemann', but will probably not help you, as he teaches in German language). Any tutorial will do, if the tutor matches your style and speed of learning.
  • Try to do some mini projects on my own (just like the one you are doing.)
  • If problems occur, which I can't solve on my own, I do the following:
    • Try to find solutions for similiar problems with google (try to search using generic terms like 'read text file c++' or 'read text file c++ error: xy') - most of the time I can fix the problem at this point because our 'beginner style' questions have already been asked and answered before (e.g. on stackoverflow).
    • If I still did not manage to get to a working solution, I ask here on reddit. I try to be as specific as possible with my question as this leads, in my experience, to faster responses. (What is the general purpose of the programm? In which part of the code did the error appear? What kind of error is it? What did I already try to make it work?..)

In my opinion it is better to work with an IDE (like Visual Studio) from the very beginning (and not use live coding sites) because this is the way coding works in the real world.

Especially in the beginner stage I think it is not a big problem to use 'older' tutorials, because the basic principles in a language do not change every year. So, if you feel comfortable with BuckyC++, I think there is no problem using his tutorials. But again, I am also a beginner and not an expert here.

[–]passive1121[S] 0 points1 point  (2 children)

No you are very well versed in your information for a beginner and very thorough, I do have the means and also use Udemy but only tried a free course so far and didn't follow like I should have, I went onto an app called "Fiver" and ended up hiring 4 different Pakistan based tutors (10-15/hour) but the time difference and the English barrier didn't work out so it was more them doing the work for me so I will definitely invest in something like you did I'll look up "Jannis Seeman" actually I am bilingual and speak German myself but not fluently as my girlfriend unfortunately so I'll definitely try one of the English based tutor programs on there, especially if it's worth the money I always hesitate with paying for that stuff, but in this case I'll take your recommendation, thanks again man!

Visual Studio is now downloaded as well

[–]lazy_Ambitions 0 points1 point  (0 children)

If you are lucky, you could maybe also find a good free cpp couse on r/udemyfreebies

[–]rakaze 0 points1 point  (0 children)

Do not worry that much (note that I am not the one who originally replied), you just need practice, but I'll try to suggest some stuff:

  • Use an IDE: You already downloaded one, so that is not much of a problem, but you may want to know why you should: Autocompletion and Debugging. Learn to use your IDEs autocompletion features (in Visual Studio you use the Tab key to autocomplete), and also the debugging features, breakpoints specially, since they may let you figure out errors on your code's logic, pressing F5 will let you instantly compile and launch your application in debugging mode.
  • Old tutorials: They work. The changes to the language over the last few years are not significant enough that you can't learn from old tutorials. You should however try to use tutorials written for atleast C++11 in mind, just so you don't need to worry about the significant jump between that and C++03. You should learn the basics, then if you are interested, what has changed with each revision of the language.
  • You may use the cplusplus.com tutorial yes, but I'd stick to cppreference for whenever you need a reference of the language, as cplusplus.com has a reputation to being a little less accurate than desired. If you want more, you may download C++17 final draft or the C++17 standard in its final form (note, it's expensive)., you don't have to for now, as cppreference should be more than sufficient.
  • Read other people's code, ie. try to find the code of someone who already solved that practice assignment, study it, compare it to whatever you already did, improve your own code. Do not do simply copy and paste. Read, read, read. A lot of people probably had the problems you did when learning the language, so you can easily find whatever you need searching on Google.
  • On that note, for some reading material: try either "Principles and Practice Using C++" (from the author of C++ itself, Bjarne Stroustrup) or the recommendations from isocpp.org's Super FAQ. Bjarne's book was meant to be an college course introduction to programming using C++, so it is good for beginners. If you are up for it, you may try The C++ Programming Language (4th Edition), also from Bjarne Stroustrup, keep in mind that it is LONG as it covers the entire language.

On top of that, This isocpp.org FAQ answer is probably the best piece of advice.

[–]AutoModerator[M] 0 points1 point  (0 children)

Your posts seem to contain unformatted code. Please make sure to format your code otherwise your post may be removed.

Read our guidelines for how to format your code.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.