Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Wasn't the most correct way to cout,flush and cin.ignore? haven't done much C++ dev, but remember reading it somewhere
-
@JoshBent I think I did use cin.ignore() when I got better but cin.sync(); cin.getc() assigned to a throw away stack variable does essentially the same (except for wasting a byte and a few cycles)
-
ODXT33296yIt's just a hello world. I get that your professor was a dick in this situation. But you could have just done it his way for a free grade.
-
@ODXT I could have but I didn't for two reasons:
He treated people like morons, and everyone was reciting his crap back from his book (yes he taught from a book he wrote. Egomaniac) I wanted to show him I was thinking for myself.
He also teaches security so I wanted to show him that as a security teacher, his own book was littered with vulnerabilities in even the simplest of programs. -
ODXT33296y@deadPix3l
I understand what you're saying. But antagonizing the professor might not be a good idea. You can show him your skills in different ways. -
@ODXT agreed. But it was college and I was 17. That age when you're better than. Everyone else and antagonize anyone. Ehh. Mistakes. Still, marking someone down for thinking in a programming class. Lame.
Related Rants
-
linuxxx30At my study's final exams, I coded a system with login and everything included. Showed it at the final delive...
-
cave11Admin: "Wait, I noticed unusual traffic." Me: "What is it?" Admin: "Looks like we have a bot here." Me: "A ...
-
dfox6This was during the first day of my first real dev job, straight out of college. I didn’t have have much exp...
So I have too many posts for wk110. It's sad. Here we go. I got a bad grade on an assignment for a hello world program in college. How do you write a hello world program that successfully prints hello world and not get 100 percent?
The teacher insisted that we write a console "hello world" program in C++, on windows. If he can't read hello world, you fail. So you must add `system("pause")` at the end so the window stays open. One problem: system() is horribly insecure and im stubborn. I refused to write exactly what he wanted, like everyone else did, because I try to not write code I know is unsafe. So I ended my script with cin.get() which also pauses for input. Unlike pause however it can't be any key, it reads a line, so you must hit enter. This was "unfavorable behavior" and ultimately I got something like a high C, low B grade. Only person to not get 100%
rant
wk110
path hijacking
goodbye world