![]() |
Help with Poinert Structure..
I don't understand how to make a Pointer Structure can someone help me to modify my
program?!:worried: and I have another problem, I'm using fgets scanning but there is a problem after an input for numbers 1 to 4 the fgets captures NULL and pass thru the default in my switch statement how can I stop that?because my professor what to capture the spaces..lastly how can i check the values of the real and imaginary numbers using atof when the input is a string or a char and there is no range of values how can i do that?!Thank!! Code:
//This program prints the initialized value of two complex numbers and allows |
Re: Help with Poinert Structure..
as a start do the following
Code:
........for example Code:
.............. |
Re: Help with Poinert Structure..
isnumber function
============== check before atoi,atof the string you want to convert Code:
#include <stdio.h> |
Re: Help with Poinert Structure..
the above code (isnumber function) is suitable only for atoi function
to get an integer from string. for atof you need some more changes for instance you can only have one . in your string you can have one - but only as the first char for example -1.55 but if you want numbers like -10.5e-03 it wants some more things to implement. still only one . - can be 2 e can exist but it must be followed by + or - and at least one number after the signs. happy coding!! |
Re: Help with Poinert Structure..
I understand the isnumber function but the problem is that I don't know what are the initialized value inside the array and what how can I make a pointer structure in the inputs or in the printing, here is an example:
Code:
#include <stdio.h> |
Re: Help with Poinert Structure..
here is a small example for you.
Code:
#include<stdio.h> |
Re: Help with Poinert Structure..
Sir can you help me figure out the problem in displaying all the complex numbers here is my new code
Code:
//This program prints the initialized value of two complex numbers and allows |
Re: Help with Poinert Structure..
see the changes below
Code:
//This program prints the initialized value of two complex numbers and allows |
Re: Help with Poinert Structure..
I love you virxen!!!your my idol
|
| All times are GMT +5.5. The time now is 08:35. |