#include <stdio.h>
#include <stdlib.h>
#define optionlist "*************\n\n1. Preorder\n2. Inorder\n3. Postorder\n4. Update\n5. Load\n6. Save\n7. Help\n8. Quit\n\n**************\n"
void...
Type: Posts; User: jibbles
#include <stdio.h>
#include <stdlib.h>
#define optionlist "*************\n\n1. Preorder\n2. Inorder\n3. Postorder\n4. Update\n5. Load\n6. Save\n7. Help\n8. Quit\n\n**************\n"
void...
i half understand..
but i thought argv[1] refers to the 2nd thing written on the command line..
eg.
c:/fts text.txt
would run the file fts and then argv[1] would be test.txt
#include <stdio.h>
#include <stdlib.h>
#define howto "Enter a number 1-8 to select from the menu\n\n\n"
#define menu "*********************\n 1. Preorder\n 2. Inorder\n 3. Postorder\n ...
i worked it out, i could just use 11 and 10 to represent 000011 and 000010 shifty little trick :) but it did what i needed.
i'd just like to thank you all for the help you've given me over the...
i know this may seem odd but i want to read in an input starting with a 0
its a menu selection
the menu options need to be
100000
100010
000010
000011
ok i learnt alittle about scanf returning a 1 last semester but i didn't learn to check it (in most cases)
1 = true
0= false
u reccomend checking that each time u use it?
also, you were right...
sorry, what do u mean check the return of scanf() i'm unfamiliar with what u are talking about..
also, i still don't see how my logic is floored?
i'm saying while code is not 32 OR is not 34 etc...
salem, your answer makes more sense, thanks.
but that still makes no sense to me, because if u entered 10 for example, which fits inside the limit, it wouldn't do anything.
while on that subject,...
sorry i mightn't have explained myself properly?
the program i wrote works fine, if u enter "32" then it adds the numbers. but the "6 bit code" is what has thrown me. is 32 6 bit code? or am i...
guys, i realise i've made 3 threads in the last 24 hours, which is probably excessive and i'm sorry. but i consider this to be a different subject.
i'm supposed to design a program that based on a...
thanks heaps! i wasn't thinking straight with that.. i was trying to put the for loop to add it ahead of the first printf, i couldn't think liek the program..
it really wasn't that hard.. but i...
thanks sean, thats a pretty good idea.. i'll definently look up some tutorials, and i have a nice fat c book with me
a first book of ANSI C (third edition)
although i have trouble understanding...
sorry. i should have mentioned that this is actually a seperate part.
in the other thread i need to convert hex to bin.
in this thread i need to convert again, but also to seperate. and i think...
*read 32 bit number in hexadecimal format
(printf/scanf)
the hex number needs to be divided into groups of binary
eg. hex number is 7a348734
needs to be divided into groups of 6...
guys that stuff looks really technical and i can't really understand it..
i'll definently spend alot of today trying to make something like you have suggested work, or possibly you could help me...
well i'm not sure of the best way to convert the hexadecimal into binary code.
so i thought what i would do is look at each part of the number individually..
eg.
12a44d72
would be broken into...
sorry the reason i want to store it in an array is to then convert it into binary, which i'm not all that sure about anyway.
but i was thinking that if its in a two dimensional array i can use a...
ok, i'm attempting to change my code to read into a 2 dimensional array now. so i'll go into more depth.
there is a 40 of 32 bit hexadecimal numbers in a file.
eg.
12a44d72
4d72608f
.
.
.
salem thanks for your help.
still have a problem with the last thing..
i'm reading hex numbers from a file, for example 00032ad45
and the %#x hasn't fixed me there..
i'll keep trying but any...
edited now. thanks
hey guys i've got a conversion here but it is not displaying correctly.
it is making the large hexadecimal numbers into negative decimal numbers.
also when displaying a hex number with a 0 at...
thanks for your help, but i don't fully understand.
is the passing it as a single character the NUMEL part as NUMEL is defined as 200 which means it only sends the value stored at 200.
or is it...
hey guys. to the guys who helped with my earlier prob about a bubble sort, this is kind of a continuation (although i couldn't solve my probs, i'll seek help at school tomorrow).
heres the prob....
oh hell! your write about me changing their money and everything! i must be going about this all wrong!
ok heres what i've got, a struct of up to 100 customers (which are added manually, that all...
thanks heaps for your help guys i really appreciate it.
i'm trying so hard to get this done and there is still so much more to do but it's just not working! i've got it down to no errors but its not...