# Search:

Page 1 of 20 1

1. ## Thread: Help - Walk in a bidimensional array

Replies
38
Views
2,775

### Yes! And since there is ALWAYS another empty...

Yes!

And since there is ALWAYS another empty square in this pirouette pattern, until they're all full, only one loop is needed.
2. ## Thread: Ignore negative numbers in array

Replies
8
Views
12,150

### How do you want to ignore them, and when? If I...

How do you want to ignore them, and when?

If I gave you a list of numbers with some negative numbers to be ignored, and you had no computer, how would you go about ignoring those negative numbers...
3. ## Thread: Help - Walk in a bidimensional array

Replies
38
Views
2,775

### Run my program. Your position in the array has to...

Run my program. Your position in the array has to move all four directions: up, right, down and left. You need only one loop, but you need some kind of logic to control the movement in all four...
4. ## Thread: Help - Walk in a bidimensional array

Replies
38
Views
2,775

### OK, Mr. Dancer! Anything else you'd like to tell...

OK, Mr. Dancer! Anything else you'd like to tell us? <ROFL>
5. ## Thread: Very Confused. Record Structure.

Replies
8
Views
1,109

### You could put a, b, *recs, and rectangle[50], all...

You could put a, b, *recs, and rectangle[50], all on the same line of code, since they are all RecT's data type.
6. ## Thread: Basic C Programming help!

Replies
18
Views
1,872

### You posted: Which looks like three different...

You posted:

Which looks like three different rates to me.

The only way to learn this, is by doing it. Take a paper and pencil, and work through some simulated rental costs, for different...
7. ## Thread: Very Confused. Record Structure.

Replies
8
Views
1,109

### It's smart to take it step by step, compiling...

It's smart to take it step by step, compiling every few lines to check the syntax. You CAN have structs defined inside a function, but then you can't easily make an instance of the struct, inside the...
8. ## Thread: Help - Walk in a bidimensional array

Replies
38
Views
2,775

### You can control the movement through the array,...

You can control the movement through the array, with just one loop, but in noting how simple it was in pseudo code, I probably misled you as to the actual code.

You're on the right track, but...
9. ## Thread: Help - Walk in a bidimensional array

Replies
38
Views
2,775

### Holy Moley! It's not a different function for...

Holy Moley!

It's not a different function for every direction - it's one loop, with one turn, when you can't go straight in the direction you are traveling now, and loop.
10. ## Thread: Help - Walk in a bidimensional array

Replies
38
Views
2,775

### DING! DING! DING! Winner winner, chicken dinner!...

DING! DING! DING! Winner winner, chicken dinner! :)
11. ## Thread: Very Confused. Record Structure.

Replies
8
Views
1,109

### I beg to differ, Roadrunner - it makes me feel...

I beg to differ, Roadrunner - it makes me feel SOO GOOOD! <j/k>

problem #1:

1) Is the struct definition, above main(), before any other functions? If not, make it so.

2) Move the declaration...
12. ## Thread: Help - Walk in a bidimensional array

Replies
38
Views
2,775

### You can use either a for or a while or a do while...

You can use either a for or a while or a do while loop. They all can be made to work in place of the other. I like the for loop for this one.

You turn right on square one, and enter the loop.

...
13. ## Thread: Help - Walk in a bidimensional array

Replies
38
Views
2,775

### Nothing wrong with that approach, but it's more...

Nothing wrong with that approach, but it's more code. This algorithm minimizes BEAUTIFULLY, if you let it. WAY EZ.
14. ## Thread: Basic C Programming help!

Replies
18
Views
1,872

### If you don't need to add taxes, etc., then LEAVE...

If you don't need to add taxes, etc., then LEAVE THAT PART OUT. You WILL need to calculate at least three different rates, however. Your calculations MUST be similar to what I wrote above.

This is...
15. ## Thread: Help - Walk in a bidimensional array

Replies
38
Views
2,775

### NO! God NO! Don't start counting steps! :( ...

NO! God NO! Don't start counting steps! :(

It's simple, in one loop, you have two if statements. The loop ends when there are no vacant squares left. It's EZ!

Yes, I made a maze solver program...
16. ## Thread: Basic C Programming help!

Replies
18
Views
1,872

### There isn't just ONE WAY to make this...

There isn't just ONE WAY to make this calculation. ATM, I'd look to changing all the time intervals into minutes. Lots of them, won't both the computer at all.

Then see, how many (if any) minutes...
17. ## Thread: Help - Walk in a bidimensional array

Replies
38
Views
2,775

### Follow the "right hand rule": 1. Start by...

1. Start by going right, as far as you can. Put a unique "have been there" value, into each square of the array, you have visited.

2. When you can no longer move...
18. ## Thread: Basic C Programming help!

Replies
18
Views
1,872

### You are doing the time calculation yourself - so...

You are doing the time calculation yourself - so you don't need time.h. time.h is used mostly when your program needs to work with the reported times from the computer.

You can keep all your...
19. ## Thread: Help! - FILE - sort alphabetically

Replies
35
Views
2,170

The only reason I'm able to help you Juan, is because you have posted some code. That's a rule on the forum, because otherwise we become the "short order" center for students to get their homework...
20. ## Thread: Help! - FILE - sort alphabetically

Replies
35
Views
2,170

### Sure, are you using a while loop? As the while...

Sure, are you using a while loop? As the while loop moves up the array of top names, each name can be strcpy()'d down to the next index number. array[98], becomes array[99], then array[97] is...
21. ## Thread: Help! - FILE - sort alphabetically

Replies
35
Views
2,170

### Yes indeed. the char array[10][20], can be...

Yes indeed. the char array[10][20], can be printed out with

for(i=0;i<10;i++)
printf("%s\n",array[i]);

which is a very handy way to print out strings. Replace the printf() line of code...
22. ## Thread: Help! - FILE - sort alphabetically

Replies
35
Views
2,170

### To save a list of names, you would need a two...

To save a list of names, you would need a two dimensional array (length and width).

Instead of name1[10] which is one dimensional, you need names[10][20]. That would give you room for ten names,...
23. ## Thread: Help! - FILE - sort alphabetically

Replies
35
Views
2,170

### I like your idea Juan. Why not try it out with...

I like your idea Juan. Why not try it out with say, 20 names, and keep the lowest 10 of them, in an array. Work through the details of the code, and then jump it up to the million names, and 100...
24. ## Thread: the sleep function in C and serial programming

Replies
9
Views
1,284

### Not all boards are using chipsets that support...

Not all boards are using chipsets that support the HPET fully, yet. MS is providing some software support for them, and for legacy users of it's older Multimedia timer as well, but it has become...
25. ## Thread: Problem with fgets()

Replies
14
Views
1,063

### The problem is where you change over from...

The problem is where you change over from fscanf() to fgets(). fscanf() scans and saves (hopefully) the file data UP TO BUT NOT INCLUDING, the newline char. So when fgets() begins saving data, it...
Results 1 to 25 of 500
Page 1 of 20 1