I need a function that will populate a multidimensional array with a fixed amount of elements. So that only some of the locations contain a distinguishing number for identification.
boujibabe
0
Junior Poster
Recommended Answers
Jump to PostWalt, when I'm using for loops, my C++ compiler allows me to declare and initialize a variable within a for loop. I don't know if that is valid standard C syntax though. Here is a link briefly illustrates another emitted C2143 syntax error:
Jump to PostWalt, when I'm using for loops, my C++ compiler allows me to declare and initialize a variable within a for loop.
In C++, this is allowed:
int main(void) { int i; i = 23; int j; j = i * 3; for (int k=1; k < 10; …
Jump to Posthello
Jump to Post> for (int i=0;i<row_size;i++)
This is C, not C++You must declare
int i;
at the start of the block, and then
for (i=0;i<row_size;i++)> attempts++;
Since the preceding if and else both contain continue, how is this line ever executed?Using a few more braces would …
Jump to PostWithout comments it's difficult to say for sure what you intended. I have commented on the code you posted based on what I think you are trying to do. If I am correct, then there is a logic error involved. Ask yourself how many bones will be placed in the …
All 49 Replies
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
Lazaro Claiborn
1
Junior Poster
boujibabe
0
Junior Poster
Lazaro Claiborn
1
Junior Poster
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
Lazaro Claiborn
1
Junior Poster
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
Lazaro Claiborn
1
Junior Poster
boujibabe
0
Junior Poster
boujibabe
0
Junior Poster
Lazaro Claiborn
1
Junior Poster
Lerner
582
Nearly a Posting Maven
boujibabe
0
Junior Poster
Lazaro Claiborn
1
Junior Poster
Lazaro Claiborn
1
Junior Poster
boujibabe
0
Junior Poster
Lazaro Claiborn
1
Junior Poster
Lazaro Claiborn
1
Junior Poster
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
boujibabe
0
Junior Poster
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
boujibabe
0
Junior Poster
Lazaro Claiborn
1
Junior Poster
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
Lazaro Claiborn
1
Junior Poster
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
boujibabe
0
Junior Poster
jnabeel
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.