You will never stop explaining that^ to people.
@OP, don't know about others but GO programming language is something to looks into. Never mind, just go with whatever you decided, i will feed the GO gospel to someone else.
Hey! Thanks for the suggestion, I'll check it out, seems really cool.
I've actually started this today and I must say it's been quite more difficult than I thought (a big leap from my calculator, at least). C wasn't the friendliest choice indeed (please don't go I told u so on me =P), but thankfully there are plenty of resources out there so I managed to make some progress. I think I'll post the code I have so far, so if I'm screwing up I can realize I am, and maybe give someone a good laugh.
Which brigns a question, can I post the code here ? or should I make a thread in C/C++ section? I've done my cookie research, and it seems a reliable way to lose one is by posting in the wrong section, so, better careful than cookieless.
EDIT: Nvm, I've checked the other posts, and apparently it's ok to post some code here.
So here it is so far, I'm pretty sure there are some headers there that aren't used at all, product of trial and error, I'll have to go over them again to find out which ones =P. Also I think it looks quite messy, don't know how to improve that though.. Right now, what it does is:
-asks for amount of pictures in folder
-opens pictures one at a time
-asks for number and stores it
-then displays the filenames with corresponding numbers on screen (just to make sure everything is still there)
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <dirent.h>
#include <string.h>
#include <stdlib.h>
int main(void)
{
DIR *mydir = opendir("/home/martha/Pictures/test");
int filetotal;
printf("input total amount of files:");
scanf("%d",&filetotal);
char filepath[100];
typedef struct {
char *name;
int score;
} packet;
packet img;
packet table[300];
struct dirent *entry = NULL;
int i;
for(i=0;i<=(filetotal+1);i=i+1){
entry = readdir(mydir);
if(entry->d_name[0] != '.'){
img.name = entry->d_name;
strcpy(filepath,"eog /home/martha/Pictures/test/");
strcat(filepath,img.name);
printf("%s\n",filepath);
system(filepath);
printf("enter 0 to 19 score\n");
scanf("%d",&img.score);
printf("%d assigned\n",img.score);
table[i]=img;
}
}
for (i=0;i<=filetotal+1;i=i+1){
printf("%s %5d\n",table[i].name,table[i].score);
}
return 0;
}
Current issues are
-Pictures still have to be manually closed, as program doesn't continue running until they are. (still haven't found a way of solving this)
-Can't get rid of "." and ".." output in the table, although it doesn't really matter, since I'm gonna discard 0s anyway.
So, what do you think? It looks clumsy, doesn't it? I'm kinda proud of it anyway, cause it was sort of challenging, and it's way better than nothing =).
EDIT 2: I find that system() line terrifying after reading nonce's advice.