help on C on Windows needed desperately

This is a discussion on help on C on Windows needed desperately within the C Programming forums, part of the General Programming Boards category; Originally Posted by laserlight You probably don't even need anything platform specific, so don't use that as an excuse. Actually ...

  1. #16
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by laserlight View Post
    You probably don't even need anything platform specific, so don't use that as an excuse.
    Actually if he has to create a files list that's not only platform specific it's likely to be filesystem specific.

    In windows the function calls to enumerate a folder would be FindFirstFile() and FindNextFile() I have no idea what they would be on MAC or Linux.

    The balance of the program... opening and crunching the files will likely be platform independent.

    If our friend is on Linux he can use the Wine windows emulator or Parallels for Mac.

  2. #17
    Registered User
    Join Date
    Nov 2010
    Posts
    9
    thanks Common Tater --- can I get any example of how this would be done on something that "should work" with the VS c compiler. any example that list something or anything in a directory.

    I have the rest pretty much figured out but I have been IM-ing the code to a friend of mine who would compile it form and so on ... major pain...


    thanks again

  3. #18
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by invalidPreproc View Post
    thanks Common Tater --- can I get any example of how this would be done on something that "should work" with the VS c compiler. any example that list something or anything in a directory.

    I have the rest pretty much figured out but I have been IM-ing the code to a friend of mine who would compile it form and so on ... major pain...


    thanks again
    FindFirstFile Function (Windows)

    Took about 7 seconds on Google....

  4. #19
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    20,968
    Quote Originally Posted by CommonTater
    Actually if he has to create a files list that's not only platform specific it's likely to be filesystem specific.

    In windows the function calls to enumerate a folder would be FindFirstFile() and FindNextFile() I have no idea what they would be on MAC or Linux.
    Please see post #15. The reason why I ask "what compiler is your instructor going to use to compile your code" is that if invalidPreproc has a choice, the MinGW port of gcc could be used, in which case development can proceed with <dirent.h> (and related facilities) on Mac OS X or Linux, and the code should still be compilable on Windows. However...

    Quote Originally Posted by invalidPreproc
    can I get any example of how this would be done on something that "should work" with the VS c compiler. any example that list something or anything in a directory.
    So that answers my question on the compiler.

    Quote Originally Posted by invalidPreproc
    I have the rest pretty much figured out but I have been IM-ing the code to a friend of mine who would compile it form and so on ... major pain...
    I agree with CommonTater's suggestion: if this is not a one off assignment, then you really should use an emulator, or whatever else (school computer?), so that you can program properly for the next assignment. You can search for information on how to use a library, yes, but often the learning process also involves trying, and having to do that in proxy by IM is a Bad Thing for your learning.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  5. #20
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by laserlight View Post
    I agree with CommonTater's suggestion
    Well there's a first...

    : if this is not a one off assignment, then you really should use an emulator, or whatever else (school computer?), so that you can program properly for the next assignment. You can search for information on how to use a library, yes, but often the learning process also involves trying, and having to do that in proxy by IM is a Bad Thing for your learning.
    Yep... especially if he's got his friend fixing his code for him... He won't learn anything that way.

  6. #21
    Registered User
    Join Date
    Nov 2010
    Posts
    9
    Thank you for all your help!

    so to clarify a bit further: this is not actually a class assignment and my friend is not correcting my mistakes --- he is simply copy-pasting source and compiler messages...

    I wish I could use a school machine, an emulator...or anything else, but this week I have no such option and hence the post

    Thanks again

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Windows-Linux Comparison
    By Yarin in forum General Discussions
    Replies: 80
    Last Post: 02-14-2010, 04:10 PM
  2. Replies: 0
    Last Post: 12-08-2009, 06:39 AM
  3. Program works on Windows XP and 2000, not on 98 or ME
    By MidnightlyCoder in forum C++ Programming
    Replies: 7
    Last Post: 03-10-2006, 02:36 PM
  4. SDL and Windows
    By nickname_changed in forum Windows Programming
    Replies: 14
    Last Post: 10-24-2003, 12:19 AM
  5. Windows Memory Allocation :: C++
    By kuphryn in forum Windows Programming
    Replies: 2
    Last Post: 11-03-2002, 11:13 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21