Every time I try to extract data from a file that I have, it extracts the 2 first numbers and then it throws me a Segmentation fault. Here's the code of the two functions that are used:
void...
Type: Posts; User: medeshago
Every time I try to extract data from a file that I have, it extracts the 2 first numbers and then it throws me a Segmentation fault. Here's the code of the two functions that are used:
void...
I removed every fflush(stdin) and still doesn't work.
void crearlog(struct producto **cabecera)
{
struct producto *actual,*sucesor; //line 38
actual=*cabecera;
FILE *log;
I didn't write this code, it's from the guy I'm doing this...
asdf.c:38: aviso: variable ‘sucesor’ sin usar
That's the problem I'm having. When I try to search throught the list I get this:
Medicamento a buscar: ASPIRINA
ASPIRINA
Precio:...
I don't know why it doesn't work. In dev-c++ I can do a search without any problems. In gcc it doesn't eve works. I really need to get this working with gcc.
#include <stdio.h>
#include...
So I have to save the password to an array and add an end of string to that array?
I did it like this:
int a;
char pass[20]
printf ("\n Enter your password : ")
scanf ("%s", pass);
I need to trasnform the array to a string.
How can I convert an array to a pointer to a char?
Thanks, I didn't notice that. But my main problem continues to be the comparison.
I need to compare the string entered by the user (the password) with the array, comparing messageclear with messagecrypt will always throw me an error because one is the password decoded and the...
I have a password inside a file that's ciphered with the caesar cipher (you move the letter 3 spaces to the right, if you have 'a' it becomes a 'd', if you have a 'b' it becomes an 'e' and so on)....
Thanks.
I have to do a program that evaluates if the digits of a number are alternatingly evens and odds. Example = 23232, 1234, 9634, etc.
#include <stdio.h>
int main()
{
int a;
int cont=0;...
Thanks, now it works great.
This is how it looks now:
#include <stdio.h>
int main()
{
int a=0, n;
float den, suma=0.0;
I have to do the following:
Read a number and calculate the following sequence:
1-1/2+1/3-1/4+1/5...1/n
This is the way I'm doing it, but it doesn't work:
#include <stdio.h>
int main()