Hello together,
I´ve wrote some C-Code. Now I want to have the code autoformated. How can I do this???
---------------------------------------------------------------
#include <stdio.h> #include <stdlib.h>
int main(int argc, char *argv[]) { //1. FILE* input=fopen("input.bin","rb"); //2. short data[ARRAY_LEN]; int in_count=fread(data,sizeof(short),ARRAY_LEN,input) //3. for(int i=0;i<in_count;++i) data[i]/=2; //4. FILE* output=fopen("output.bin","wb"); fwrite(data,sizeof(short),in_count,output);
//Aufräumen: fclose(input);fclose(output);
system("PAUSE"); return 0; }
Hello together,
I´ve wrote some C-Code. Now I want to have the code autoformated. How can I do this???
---------------------------------------------------------------
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
//1.
FILE* input=fopen("input.bin","rb");
//2.
short data[ARRAY_LEN];
int in_count=fread(data,sizeof(short),ARRAY_LEN,input)
//3.
for(int i=0;i<in_count;++i) data[i]/=2;
//4.
FILE* output=fopen("output.bin","wb");
fwrite(data,sizeof(short),in_count,output);
//Aufräumen:
fclose(input);fclose(output);
system("PAUSE");
return 0;
}
---------------------------------------------------------------