Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

File/File Size list - C

Name: Anonymous 2011-11-22 7:02

Was wondering if any C guru's knew where the hell im going wrong with my code, I just want to list file names and file sizes of files in a directory, file sizes seem to be printing as addresses. Learning C is hard ;(

Should be easy!

http://pastebin.com/Y6ruNEum

Name: Anonymous 2011-11-23 16:32

>>24
Okay, since you are clearly struggling with your C programming I will help you. I'm going to set up a minimal test program which you can try to compile and run

#include <stdio.h>

int main (void) {
  int a = 10;
  int b = 0;

  if (a)
    puts("This test hits!");

  if (b)
    puts("This test doesn't hit :-(");

  return 0;
}


Your next assignment is to compile and run this and tell me the output, if you have any trouble doing so you can post it here.

Also feel free to thank me later for helping you, although I'm happy to help I like being appreciated.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List