this program im writing as some of u probs already know is sposed to invert and scroll pictures. As a student as was required to write a function to invert the photo and procedures to horizontally...
Type: Posts; User: kiz
this program im writing as some of u probs already know is sposed to invert and scroll pictures. As a student as was required to write a function to invert the photo and procedures to horizontally...
yeh but wat if i entered 123a1231 as input?? how would i be able to tell then?
say i enterd 12312 as input... wat does the end pointer get to set to?? wat can i compare it to to validate the input as an integer
i take it pstr is the end pointer but which is the start pointer?? and wat if the first character was a digit but the second one wasnt?
so wat part of this function can i use to tell me if the user didnt just enter an integer??
i was wondering id neone could educate me as to how to use the strtol function.. I need it to to convert a string to an integer and tell me if the string contains a non digit.. an example would make...
cant see why this wont compile
#include <stdio.h>
#include <ep100lib.h>
int Image_Invert(int image_data[height][width], int height, int width)
{
int row, column, red, green, blue;
how do i write the atoi() command in pseudo code???
this program so far is ment to prompt for and accept 10 values, store them in an array and then print them out.. the only problem i have is that when it prompts for the first value, it doesnt accept...
int main(int argc, char * argv[])
{
// Mainline Variable Declarations
FILE * output = stdout;
FILE * input = stdin;
int vname=0, viso=0, vaperture=0, error=0;
float iso, apertureno=1.0;
ok i changed it to %1s and i got rid of the 1 character array.. just set it as char aperture
I think its not storing either the float nor the char properly because i initialized the float to 1.0 and...
that didnt fix it
this is weird
when i go into the 3rd menu and enter in the aperture value it spits something out really weird. like i enter in f1.2 and instead of spitting out "f1.2" it says "é159.187317"
does...
how come i get a segmentation fault when i try to store the iso integer?? in the else if state ment
int main(int argc, char * argv[])
{
// Mainline Variable Declarations
FILE * output =...
this seems weird to me... their seems to be something wrong with the while loop conditions.. the way it is written now i wouldnt have though that the loop would even start because...
tell me if I am write or not with this
the reason it wont work the second time is because it has already one/multiple characters stored in the input buffer so when i write "Q" it will be stored as...
i tried intialising it as 'a' aswell
let try and explain wat isnt working again if it didnt seem clear
these things happen in the program
case 1
1. I run program
2. I enter 'Q' at menu...
well I initialized it to just "aa" but i still have the same problem.
where does the "random garbage" come from?? so how do i fix it?
wat am i comparing before inputting.. could u be a bit more precise.. i havnt got much experience
wait no i dont.. help still please
haha
sorry i see
The program ends fine when i enter "Q". but if I enter "1" first and then enter my name, once it loops back to the menu "Q" wont end it anymore.
help please
int main(int argc, char *...
cheers mate that helped
Im at university atm and just started an engineering program unit. Our lecturer, for some reason, wants us to stick to fscanf for now anyway otherwise we get marked down...
any reason why this program wont do as its told. I just want it to stop
displaying the menu when i enter "Q" at this stage. But when i enter any
character including "Q" the menu is just displayed...