13

Tried c++ and Qt today

Expected output: "Hello world"
Running normally: (garbage)
Running normally, but outputting the length of the string to qDebug: "Hello world"

W H A T

Comments
  • 6
    Your doing it wrong.

    Show us the code!
  • 0
    Sounds like you made a mistake
  • 2
    @Demolishun @YADU

    Yep, of course. I was passing 8 bytes instead of 16 bytes to the AES function.

    How outputting the length of the array fixed that? I will never know. Maybe it set the next few bytes to exactly 0 instead of garbage. Leading theory.
  • 0
    @AlgoRythm Ah, encryption, that is its own punishment.
  • 0
    I also want to learn C++ as well. Not sure from where should I start? Can you please guide me a little?
  • 1
    @KeyLerri Depends on what you already know. If you don't already, you should get very comfortable with both c and a bytecode c-like language of your choice (c# or java, basically).

    c++ demands a good understanding of both
  • 0
    @AlgoRythm Thanks for your reply here. Actually, I am totally new to programming. I don't know anything yet. But I have a great interest in this field. Thank you!
Add Comment