Skip to main content
gamedev.net
🔒 Locked

c++ question?

Started by Mark1003 1 reply 850+ views
Original Post
Mark1003
Mark1003
So I want to know how you do this?


//the integar to loop
int number;
//just to make it repeat a lot
for (int random = 0; random < 1000; random++)
{
//testing if space "number" of my array input is equal to a
if (input[number] == a)
//this is where I'm stuck, I want to make slots number to number + 7 become what I say, but I have to avoid overlapping
binary[i want to make this like "number to number plus 7"] = 01100001;
......
......
.......
so on so on.




so any ideas? Thanks in advance
Serapth
Serapth

So I want to know how you do this?


//the integar to loop
int number;
//just to make it repeat a lot
for (int random = 0; random < 1000; random++)
{
//testing if space "number" of my array input is equal to a
if (input[number] == a)
//this is where I'm stuck, I want to make slots number to number + 7 become what I say, but I have to avoid overlapping
binary[i want to make this like "number to number plus 7"] = 01100001;
......
......
.......
so on so on.




so any ideas? Thanks in advance


Use bitset.
Mark1003
Mark1003
thanks! I think it should help!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.