Thread: files in C

  1. #1
    Registered User
    Join Date
    Apr 2007
    Posts
    21

    files in C

    hey everyone..
    i have a doubt in C files.how can i read a file from SDRAM.
    cutelucks

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Read from it the same way you read from any other media. Your OS detects it and maps it to a drive letter or location, and you read from it as per normal.


    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Registered User
    Join Date
    Apr 2007
    Posts
    21
    that was my question.how do we read a file from any external device like SDRAM

  4. #4
    Lean Mean Coding Machine KONI's Avatar
    Join Date
    Mar 2007
    Location
    Luxembourg, Europe
    Posts
    444
    Just like you'd read any other file:
    Code:
    FILE *fin = fopen("Z:\\file.txt", "r");
    The first argument, the path, is completely OS dependent and varies wildly if you use windows or linux. Just let the user browse for the file or enter the path himself.

  5. #5
    Registered User
    Join Date
    Apr 2007
    Posts
    21
    My question is if i wish to read a file stored in RAM to the processor,how can i do it?

  6. #6
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Stored in ram how? If it's a ram drive (ala DOS), then it's mapped to a drive letter. Otherwise, you need to actually explain what the hell you're talking about.


    Quzah.
    Hope is the first step on the road to disappointment.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Ressources files
    By mikahell in forum Windows Programming
    Replies: 4
    Last Post: 06-19-2006, 06:50 AM
  2. add source files to embedded VC 4.0
    By George2 in forum C++ Programming
    Replies: 4
    Last Post: 06-13-2006, 03:28 AM
  3. *.cpp and *.h files understanding
    By ElastoManiac in forum C++ Programming
    Replies: 4
    Last Post: 06-11-2006, 04:45 AM
  4. Linking header files, Source files and main program(Accel. C++)
    By Daniel Primed in forum C++ Programming
    Replies: 3
    Last Post: 01-17-2006, 11:46 AM
  5. Multiple Cpp Files
    By w4ck0z in forum C++ Programming
    Replies: 5
    Last Post: 11-14-2005, 02:41 PM