Doubt in file operations...

This is a discussion on Doubt in file operations... within the C++ Programming forums, part of the General Programming Boards category; Hi, I want to open a file ( say "test.cpp"), only if it doesnt exist in the folder that has ...

  1. #1
    Registered User
    Join Date
    Oct 2006
    Posts
    16

    Doubt in file operations...

    Hi,
    I want to open a file ( say "test.cpp"), only if it doesnt exist in the folder that has the Program.
    If it already exists, I want to quit....
    I dunno how to do this...

    Can anyone help me...plz..
    thanks in advance..

    -Naren

  2. #2
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,768
    Oh indeed, and do you want it for C or C++ since you've posted in both sections?
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    Registered User
    Join Date
    Oct 2006
    Posts
    16
    Solution in any language(C or C++) is fine for me...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. File Writing Problem
    By polskash in forum C Programming
    Replies: 3
    Last Post: 02-13-2009, 09:47 AM
  2. Replies: 3
    Last Post: 03-04-2005, 01:46 PM
  3. Possible circular definition with singleton objects
    By techrolla in forum C++ Programming
    Replies: 3
    Last Post: 12-26-2004, 09:46 AM
  4. System
    By drdroid in forum C++ Programming
    Replies: 3
    Last Post: 06-28-2002, 10:12 PM
  5. Need a suggestion on a school project..
    By Screwz Luse in forum C Programming
    Replies: 5
    Last Post: 11-27-2001, 01:58 AM

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