Hello again,
I make this night thes code:
#include <iostream>
#include <conio.h>
#include <string.h>
#include "stdafx.h"
//#include <stdio.h>
//using namespace std;
int readData(int numbers[10])
{
FILE *pl;
int i=0;
pl=fopen("from.txt","r");
if(pl==NULL)
printf("File wasn't opened");
while(!feof(pl))
{
fscanf(pl,"%d", numbers);
i++;
}
return i;
}
int MAX=8;
int bucket[8];
int bucketsort(int numbers[10], int n)
{
int i, m;
i=0;
while(i<MAX) {
bucket = 0;
i=i+1;
}
i=0;
while(i<n) {
bucket[numbers] = bucket[numbers] + 1;
i=i+1;
}
m=0;
i=0;
while(i<MAX) {
while(bucket>0) {
numbers[m] = i;
m=m+1;
bucket = bucket-1;
}
i=i+1;
}
return 0;}
int main(int argc, int* argv[])
{
int i,many;
int table[10];
many=readData(table);
for(i=0;i<many;i++)
printf("%d", table);
bucketsort(table, many);
return 0;
}
-------------------------
And now i have a problem with #include "stdafx.h". I found the source
of file and prepared it (it wasn't able with compiler) and it looks so:
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#if !defined(AFX_STDAFX_H__A9DB83DB_A9FD_)
#define AFX_STDAFX_H__A9DB83DB_A9FD_ // tu kazdy moze miec inna
wartosc
// Windows Header Files:
#include
// C RunTime Header Files
#include
#include
#include
#include
#endif // !defined(AFX_STDAFX_H__A9DB83DB_A9FD_)
-------------------
Is it ok? I have an error
10:9 C:\Dev-Cpp\include\stdafx.h #include expects "FILENAME" or
<FILENAME>
the same 13:9, 14:9, 15:9, 17,9 and 19:50.
What should I do?
Regards,
Luke