Thread: Basic? C++ open file problem

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Jan 2012
    Posts
    8

    Basic? C++ open file problem

    Hi all,
    I am having trouble with what should be a simple action, opening a file.
    It is a fairly special file with a .uds extension for which I have found a .h include file. I pasted the .h file into a sample program that compiled OK and added the statements below but I still get an error.

    {
    char filestring[50]= "c:\\mscv20\\test\\uds\\edlstn.uds";
    char *ptr ;
    char fileptr = *filestring;
    int fduds ;
    size_t udslen;



    ptr = uds_open_file (fduds,*filestring,udslen);

    The error below

    Initializing...
    Compiling...
    c:\msvc\samples\qwgdemo\qwgdemo.cpp


    c:\msvc\samples\qwgdemo\qwgdemo.cpp(38) : error C2514: 'uds_open_file' : class has no constructors
    CL returned error code 2.
    QWGDEMO.EXE - 2 error(s), 0 warning(s)



    Cheers
    Rick
    Attached Files Attached Files

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. problem with open file.
    By oror84 in forum C Programming
    Replies: 5
    Last Post: 01-15-2011, 08:19 AM
  2. Replies: 3
    Last Post: 03-08-2010, 02:43 PM
  3. basic file handling problem
    By georgen1 in forum C Programming
    Replies: 4
    Last Post: 03-05-2009, 06:21 AM
  4. Open File/Save File crashes on cancel?
    By Blackroot in forum Windows Programming
    Replies: 0
    Last Post: 08-02-2008, 02:16 AM
  5. Replies: 12
    Last Post: 03-10-2005, 07:48 PM