Hey folks, i have another question, I ran the code and it works but I wanted to change some stuff to see what would happen
switch (*src++) {
case '0':
Type: Posts; User: ShadowBoss
Hey folks, i have another question, I ran the code and it works but I wanted to change some stuff to see what would happen
switch (*src++) {
case '0':
but why use const at all? what benefit would it have in this case?
like here it says :
intbit_to_ascii(constcharinput[], charoutput[]) {
const char *src = input;
Why is that placed as a const char *src?
Okay it's starting to make more sense as to what is going on with both codes, thank you very much guys, at least if this pops up on a test i'll have an idea of how to go about it.
@Subsonics...
ah that makes perfect sense
however, what is this skip and repeat for?
int skip = 8;
while (skip > 0) {
Hi folks
I was browsing through the C program threads and I came across a binary to ascii code (something my professor recently showed a very brief example on)
This code is a lot more complex...
hey javaeyes, I just wanted to say thanks again for all the help i've gotten so much farther and I think ive begun to understand functions more.
I'm closer to finishing it I showed my professor...
oohhh ok i was just wondering why i had
displayMenu()
return1
and then
void displayMenu with all the printf's in it.
oooooooooo damnnnnn LOL that makes a lot more sense, i can understand all of that.
one question though. how is it that i displayed the menu to the screen?
using
displayMenu();
char askQuestion(char fish, char chips, char drinks)
{
char y='y';
char n='n';
y=toupper(y);
n=toupper(n);
char wantfish = askQuestion ("Do you want fish?(y/n)");
scanf(" %c", &fish);...
oh wow, that's awesome. haha I wish my professor was this efficient in explaining things lol. question though, would the discountrate would be predefined? or am I going to assign a value to it in the...
oh okay. Let's see if I can get this right.
#define discountrate .10
float getReducedPrice(float discountrate, float largeprice)
void getReducedPrice(float discountrate, float largeprice)
{...
ok so it looks like you made the prototypes and then your calling it after the main.
the displayMenu() you have in the main is going to return what you have in void displayMenu right?
and the...
hmmm interesting. The assignment is due tomorrow 11:59pm, im not to concerned about it being late my concern is more about utilizing functions and really understanding how to implement them, because...
Hmm i think I get what you're saying.
so i could functions like these?
fishorder(char hailbut, char haddock) [ this will cover the question for 'would you like to order fish?' and the type...
hey folks..I am beyond confused when it comes to functions, I just don't seem to get how to apply them. Basically for this assignment I need to use at least a couple functions in order for it to be...
ah i see. makes sense.
what if I want to make sure that the user inputs only numerical values for length, and width. Can I do that in a do while loop without a function?
I managed to make it so...
you guys are brilliant!
i was missing the &myvariable for something else xD
and the solution that Oogaboo stated fixed my problem.
like i dont think you guys understand how incredibly...
Hey folks, I'm running into this weird problem that ive been trying to figure out for a week now why it isn't working.
do{ if (curbing =='Y'){
...
touché lol
and stahta01 thanks for the link, I was able to understand all that.
I was looking over my friend's code to see what i was doing wrong and he had a line that said this
get_room_amount(&rooms)
for (cur_rooms=0; cur_room < rooms; cur_rooms++){
now this is...
ohhh okay. That's awesome man. Thank you so much for the help guys. I think I've got this now.
wow i totally understand that. Ok my question now is because i have "INVALID" set to as 0, should i assign int stopper to INVALID? because the stopper is suppose to set to 0 so when the user hits 0...
hmm, i tried fiddling with the
}while (entry != INVALID && counter != SIZE);
but didn't seem to work lol.
as for my issue with function
after going through some notes, ive...
oh wow i can do that? I thought the counter had to be in every line haha ahhh man. That looks so much more cleaner.