Forum: C Aug 6th, 2009 |
| Replies: 12 Views: 564 While driving into work I realized I had a bug.
// strrev( q+j, i )
strrev( q+j, i-j ) |
Forum: C Aug 4th, 2009 |
| Replies: 13 Views: 815 It's on main().
0 means successful.
else error! |
Forum: C Aug 4th, 2009 |
| Replies: 2 Views: 357 these are only some of your problems!
You don't want 11 pointers, you want 11 tallies!
// int *arrayptr [11];
int arrayptr [11];
Shouldn't you pre-clear your tallies? |
Forum: C Jul 29th, 2009 |
| Replies: 8 Views: 219 Another way to think of this, look at the index of a book. A book about animals. So in the Index lookup bears. Bears is on page 32.
If you go to page 32 you see the topic Bears.
The index in... |
Forum: C Jul 24th, 2009 |
| Replies: 3 Views: 438 Shouldn't you buy the Code Composer Studio IDE from Texas Instruments for their MSP430 processor? (Or atleast download their evaluation version available on their website?)
Or look into the GCC... |
Forum: C Jul 21st, 2009 |
| Replies: 8 Views: 747 Your key delay is too short 50/1000 = 20/second
Should be around 200. Use a 5
You need edge triggering.
swLast = getbits
loop:
sw = getbits
swEdge = sw ^ swLast |
Forum: C Jul 6th, 2009 |
| Replies: 7 Views: 345 BOOM! That's a technical term!
Your pointer needs to be pointing at real data!
int *k, v;
k = &v; // k now points to the address of {v}.
*k=10; //... |
Forum: C Jul 1st, 2009 |
| Replies: 4 Views: 315 char *extract(int *pos, char *array)
static char output[11] = {0};
int max = (*pos) + 10, count = 0;
// Need a terminator detection or will overrun the buffer
// on last 10... |
Forum: C Jun 25th, 2009 |
| Replies: 6 Views: 355 Also only doing divisor by 2 is not valid because a number may be divisable by 2 but not by another even number.
How about 198 % 2 okay, then 198 % 4 ? |
Forum: C Jun 16th, 2009 |
| Replies: 16 Views: 1,148 Oh, gotta run, but finally!
float foperand1 = 0.0725f;
float foperand2 = 0.075f;
float foperand3 = 0.0775f;
The constant float is a double unless a (f) is appended! Thus you have a compiler... |
Forum: C Jun 16th, 2009 |
| Replies: 16 Views: 1,148 As a rule of thumb keep code on separate lines. There is no executable savings and concatenating the lines hides problems such as in your case!
"%i" Hmm! I'll have to look that one up. May be... |