Jump to content

Count to a million


DubWolf

CTAM after 1 million  

190 users have voted

  1. 1. What should happen after 1 million is reached?

    • Start over at 1
      28
    • Keep counting to infinity (count to the next million(s))
      105
    • Count back down to 1 (then back up)
      52
    • Other (pm or mention if you'd like)
      15


Recommended Posts

347xxx

ย 

Work lets me pay my bills.

ย 

That's about it


I refuse to let go until you're impressed.
I refuse to let go until I'm depressed.
Link to comment
Share on other sites

347746

ย 

I'm so confused right now...
I have a function, that takes a variable and does stuff with it
for some reason it didn't work, so I checked if the variable is correctly passed.

The variable I pass is 36 bytes
the variable that is received is 8 bytes
Now the funny thing: the variable type is 12 bytes
ย 
So, in short, the received variable is not only smaller than the sent variable, it is smaller then the type it is of! (that's impossible, theoretically)


โ€žI shall be quiet as a calm sea. Which is... not... very quiet.โ€œ

โ€žThis is intolerable!โ€œ

โ€žEven combat is a partnership... for a little while.โ€œ

Link to comment
Share on other sites

347748

ย 

Indeed...


โ€žI shall be quiet as a calm sea. Which is... not... very quiet.โ€œ

โ€žThis is intolerable!โ€œ

โ€žEven combat is a partnership... for a little while.โ€œ

Link to comment
Share on other sites

347751

ย 

It's just imagine you have something of a certain weight.

ย 

You want to sent that to someone.

ย 

The one that receives it, suddenly has something that is lighter than what you sent. (aka something else, and not what you sent)


โ€žI shall be quiet as a calm sea. Which is... not... very quiet.โ€œ

โ€žThis is intolerable!โ€œ

โ€žEven combat is a partnership... for a little while.โ€œ

Link to comment
Share on other sites

347xxx

ย 

I just had a brilliant idea for a desk plant

ย 

Coffee pot terrarium!

  • Brohoof 1

I refuse to let go until you're impressed.
I refuse to let go until I'm depressed.
Link to comment
Share on other sites

34776x

ย 

TL;DR I FIXED IT!!

ย 

ย 

Ok, so I know you guys won't understand / care to read this, but I want to explain it.

ย 

So, C++ is stupid as hell, and cannot really copy arrays, what it instead does is pass a pointer to the array into the function. (that's why it was smaller than the actual datatype)

Now to fix the problem I had, all I had to do is pass the length of the original array into the function and then in the function use the pointer together with the length of the original array to construct a new array that contains all the data that I want.


โ€žI shall be quiet as a calm sea. Which is... not... very quiet.โ€œ

โ€žThis is intolerable!โ€œ

โ€žEven combat is a partnership... for a little while.โ€œ

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Join the herd!

Sign in

Already have an account? Sign in here.

Sign In Now
ร—
ร—
  • Create New...