So anyway here's the code. I type 1 and it skips the input for the reverse string. please note this is a friend's code, i don't even do this subject but its always interesting to know why. I did a...
Type: Posts; User: ahming
So anyway here's the code. I type 1 and it skips the input for the reverse string. please note this is a friend's code, i don't even do this subject but its always interesting to know why. I did a...
Well i don't have code on me, but I sometimes come across a situation in the past where my program skips the user input, such as a gets line or an fgets line. I'm wondering why it skips this?
is...
do i just declare as normal?
http://img100.imageshack.us/img100/9362/ipheaderki6.jpg
Below is the code for my clock.
The 2nd switch function doesn't operate properly. After it goes through all the cases from 1-5, it doesn't loop back. I think I've misunderstood the purpose of...
so i could have instead of
lptr->list[pos] < item
could i have
pos instead of lptr->list[pos]? seeing as it gives the position.
well here is the full code:
currently reading about lists.
i have this line of code in an insertion function.
if (lptr->list[pos]>item)
i have an array containing this for example:
0: Deer 1:Fox 2: Dog 3:Cat
aahhh okok thanks a lot for the help!
oohhh i see. so fprintf gives you more control over where it is being directed to either stderr or stdout. even though printf uses stdout, i don't see how it'd get stuck in a file, as it always...
oh didn't know you could do that.. thought you had to use string functions from the string library. such as strcmp or whatever the one is for comparing strings.
i don't understand the difference between using
fprintf and printf for error statements.
e.g.
void mergeSort(float array[], int size)
{
yeah i understand the ascii
how do i put it..
well lets use 'post' again..
char letter = 'B' (which equals 66)
char string[i] (holds post)
if letter equals 66
string[0] is p. which 112 on...
don't understand that bit.. sorry.
but everything else you said made perfect sense. Since the single quotation marks make the letter A, equal to 65. say in the string it currently holds the word...
wow i think this is beyond me. i'm only starting to learn this stuff plus exam on it in two weeks sorry if i couldn't help
i'm a beginner in this.. but i'll make a contribution anyway and see what people say..
in this line..
i noticed your missing your typecast?
e.g.
main()
hey, pointers giving you hell as well?? yeah well your not the only one around here.
i myself still don't have a firm grasp of it all. but what i think i do know is that pointers are used because...
oki need to sort a string alphabetically by the method of selection sort.
here's the piece of code i don't quit understand.
void sortString(char* s, int size)
{
int i, j;
char...
hhmm i'll try..
could i add borders in an an array for the board? it'll be a 6x6 board
this is a project i have to do for uni
but i'm not sure if i have to use structs?
i have to create a board with ACSII characters and use 4 jewels as character symbols. i don't see where i have...
i'm trying to print out a triangular form of a set of numbers
should be printing out like this
1
22
333
4444
55555
666666
up to 9.
been spendint he the past 1 hour trying to implement this code into the above code posted by salem... can't get it to work :(:(
int isValidInput (double amount, double annualRate, int nmonths)
...
cool thanks thanks :) i understand now
why didn't you have this in your code?? and you above code with the part calling the function inputinfo(blah blah); doesn't work.
int *amountPtr = NULL; /*initializing pointers*/
...
ok what i need help here is with calling the function 'inputinfo' in the 'main()'. what am i doing wrong here..? and also if i try the same method with the rest of the functions will there be errors...
can someone explain to me how pointers and arrays work..
i'm kinda confused..