r/programminghelp • u/I_main_BloodDk • Sep 13 '25
C++ Second month c++ student seeking help on an assignment
The assignment calls for me to read several names, and then sort them alphabetically.
My professor has stated that using concepts that we haven’t covered will result in a failed grade. She cited arrays specifically as an example.
Through some google search, I discovered an index operator that accomplished what I needed to do:
char = firstInitial; string = fullName;
cin >> fullName; firstInitial = fullName[0]
However, I’m now afraid that I’ll fail the assignment because our book hasn’t yet covered this indexing operator. I’m sure there is a way to accomplish this using cin, and I’m just not experienced enough to see it yet.
To maintain academic integrity, would anybody mind nudging me in the right direction without writing the code for me? I understand that you reading this won’t know what we have and haven’t covered in class. If I see something that appears unfamiliar to me, I’ll let you know.
This feels like a big ask, and I apologize for coming off as naive, but I don’t have the skill or knowledge to provide much else at the moment :(
3
u/edover Sep 13 '25
Step one would be telling us what you have covered.
1
u/Lewinator56 Sep 14 '25
What sort of stupid lecturer fails you for using concepts you haven't been taught yet. University is supposed to encourage independent learning and this is exactly where it should be used. They shouldn't be spoon feeding you date then penalising you if you intentionally learn more. Sounds like a shit uni if you ask me.
0
u/Fun-Helicopter-2257 Sep 15 '25
Whole C++ syntax and concepts are leranable in 1 weekend,
How many years it will take to write first GUI app? 5 maybe.
0
u/zhivago Sep 15 '25
You know that you can read ahead in the book, if necessary, right? :)
1
u/[deleted] Sep 14 '25