Hello. I want to write a program with different people data in different .dat files and those files should be protected by password so other people couldn't access. I want to ask what is the best way...
Type: Posts; User: krakatao
Hello. I want to write a program with different people data in different .dat files and those files should be protected by password so other people couldn't access. I want to ask what is the best way...
When i am using
int letter=(int)alpha;
while ( currentPtr != NULL && (int)currentPtr->alpha<=letter)
program sorts list by letters ABC...
when i am using
while ( currentPtr != NULL ...
while ( currentPtr != NULL && value > currentPtr->value && strcmp( currentPtr->alpha, alpha ) >= 0)
invalid conversion from `char' to `const char*'
initializing argument 1 of `int...
Hello. I faced a problem trying to sort list alphabetically and then by number.
e.g.
surname name A 8
surname name B 1
surname name B 2
Here is my code what i tried so far
void insert(...
if ( ( fp = fopen( "list.txt", "r" ) ) == NULL )
{
printf("File does not exist. \n");
system...
You're right. Thank you very much :)
Hello I have i question. why i can't scanf character when i open file e.g.
if ( ( fp = fopen( "list.txt", "w" ) ) == NULL )
{
printf("No...
Thanks already solved.
Now I understood. But how to pass them in?
I can print tree values and delete them. Also i can insert elements into stack but when i do like this it still does not work.
void move(TreePtr current)
{
Stack start;
Stack end;
...
"G" is "end" forgot to change when translated code.
Hello. I am trying to move binary tree elements to stack. I tried to move like this but i am getting empty stack still/.
void move(TreePtr current)
{
Stack start;
Stack end;
...
I always done everything like that all programs worked. That's why i do not understood clearly. Maybe you could write few most important lines how it should look like and then i figure out the...
Hello. I am making binary with insert, print, delete search functions. I faced the problem i can't find out why my program won't delete and element. Here is my code. I think algorythm is good but...
Hello!
My problem is exactly as it says in the title
My goal is to have couple of items in the listbox and when highlighting one item a image in the picturebox should appear, and so on for each...
I have finished. Thank you.
Last thing left to do is to sort first 20 numbers but i dont know why array remains unsorted.
//float temp;
for (r=1;r<20;r++)
{
from=r;
for (j=r+1;j<=20;j++)
{
#include <stdio.h>
#include <stdlib.h>
int main()
{
FILE *fp;
int i=1,j;
float numbers,average=0;
float array[200];
while (fscanf(fp,"%f",&numbers)==1)
{
printf("%f ", numbers);
}
I faced a problem. Only first number printed out correctly other number 0.000000 i am sure number stored in file correctly...
When i will finish program i will change system ("pause");
#include <stdio.h>
#include <stdlib.h>
int main()
{
FILE *fp;
int i=1,k,j;
float numbers,average=0,now,temp,minimum;
Does not work even with this :/
for (i=0; i<=100; i++)
while(i==100)
{
if(fscanf(fp, "%f", &array[i])!=1);
break;
i++;
}
for(j=0;j<i;j++)
{
printf("%f \n",array[j]);
}
while(!feof(fp))
{
fscanf(fp,"%f",&array[i]);
i++;
}
printf("%s \n",array);
getchar();
getchar();
Still doesnt work(no output). So what should i do? :(
while(1)
{
if (fread(&numbers, sizeof(float), 1, fp) != 1)
break;
fscanf(fp,"%f",array);
printf("%s",array);
}
system("pause");