Relative Content

Tag Archive for c++

Integer arrays in a Structure inside a class

I have a class that instantiates a multi-dimensional structure of size 4 which in itself has an integer array of 6. it compiles but I cannot see the array when debugging and get the usual error ‘Object reference not set to an instance of an object’.

CMU 15213 Attack Lab – hex2raw wouldn’t run on my computer

I’m self-learning CMU 15213 course and I’m currently doing the Attack Lab. What confuses me is that the executable file attached to this lab, hex2raw can’t run on my computer. But ctarget and rtarget work fine.
I run it as ./hex2raw c0 and it won’t give any output on my terminal. I have to stop it by Ctrl + C.

Execution timed out/ Improvements on code

I’m currently working on a code that finds all of the primes in a range[a,b] and then outputs the biggest difference of consecutive primes. As the title says I’m running on the problem that my execution timed out and basically my code needs some optimization. The thing is I don’t know how to further optimize so any help would be greatly appreciated.

Execution timed out/ Improvements on code

I’m currently working on a code that finds all of the primes in a range[a,b] and then outputs the biggest difference of consecutive primes. As the title says I’m running on the problem that my execution timed out and basically my code needs some optimization. The thing is I don’t know how to further optimize so any help would be greatly appreciated.