Jump to content

  • Log In with Google      Sign In   
  • Create Account

incertia

Member Since 25 Nov 2011
Offline Last Active Oct 06 2014 01:00 PM

Posts I've Made

In Topic: \why can't I initialize a multidimensional C array with zeroes

31 March 2014 - 07:45 PM

Use
int multArr[3][2] = {0};

In Topic: Array Problem in C

30 March 2014 - 08:08 PM

You are quite ambiguous with the results don't really come out to what they should be.
This code will never put the value 0 into the new array because NULL evaluates to 0 and you only add non-zero values. C/C++ is not like Java in which null refers to nothing. In C/C++, NULL evaluates to 0 and you set pointers to NULL or nullptr because accessing memory at location 0 is guaranteed to crash your program.

Setting the ones you don't want to -1 would work better because rand() % 10 will always be positive because rand() is always positive.

i changed all references to NULL and made them a random number outside the scope I made the random numbers (999), but the same problem is still occuring :/


Perhaps you could give your program's output and your expected output.

In Topic: AES Encryption

30 March 2014 - 07:59 PM

I don't have any Rijndael at hand with me right now, but this is a working version of Rijndael and you can just add some stuff to get the expanded key.

In Topic: Resource method Release() won't release memory

28 March 2014 - 09:05 PM

Things would make a lot more sense if you also posted how you chain these calls together in your actual program.

In Topic: The swapchain->GetBuffer() function 's problem.(d3d11)

28 March 2014 - 09:02 PM

2.Are back buffers in the swapchain adjecent?(just like an array)So when i called the present(),the swapchain just change the array index?


They do not necessarily have to be adjacent I believe. Present basically flips the buffers by swapping the pointers to the array containing pixel data of the back and display buffer or just copies the contents of the back buffer to the display buffer. It's one of these, but I'm not quite sure which.

PARTNERS