Like Tree6Likes

what am I doing wrong with this fseek?

This is a discussion on what am I doing wrong with this fseek? within the C Programming forums, part of the General Programming Boards category; Let me save you some trouble. Visual C++ Projects using the .NET framework are C++/CLI projects. If you are using ...

  1. #31
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,627
    Let me save you some trouble.

    Visual C++

    Projects using the .NET framework are C++/CLI projects. If you are using it, you should know because you selected what kind of project you are making. At any rate, C++/CLI is not default behavior from the C/C++ compiler, as far as I know. I can say with certainty that a C project wouldn't be compiled with C++/CLI.

  2. #32
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,439
    > Salem, your code does not compile, the IDE(Code::Blocks) keeps saying that LARGE_INTEGER is an unknown type and so is HANDLE and that #ifdef is unterminated.
    Yeah, that's my fault.
    A severe over-estimation of your abilities.

    I just cobbled together some ideas to show the concept, and hoped you were far enough advanced to make sense of it (based on your "I want to write portable code").

    But since you're barely able to crawl (let alone fly), you need precise hand-holding every step of the way.

    printf("ENTER [path] file name.ext:\n");
    gets(file_name);
    "I felt a great disturbance in the Source, as if millions of voices suddenly cried out in terror and were suddenly silenced"
    stahta01 likes this.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #33
    TEIAM - problem solved
    Join Date
    Apr 2012
    Location
    Melbourne Australia
    Posts
    1,323
    I saw the "gets" as well.

    Yucky.
    Fact - Beethoven wrote his first symphony in C

  4. #34
    Registered User
    Join Date
    Nov 2011
    Posts
    150
    Sorry Salem, I am just a beginner. Please pardon me.

  5. #35
    Registered User
    Join Date
    May 2009
    Posts
    2,510
    Quote Originally Posted by Salem View Post
    "I felt a great disturbance in the Source, as if millions of voices suddenly cried out in terror and were suddenly silenced"
    Sorry about the gets; I just Google for MinGW C example.
    FYI: I could not get MinGW to work with GetFileSizeEx call; it kept saying it was not prototyped right.
    Edit: I am 90% positive I was just missing a header or a correct define; but, gave up for Google tello.

    FAQ > Why gets() is bad / Buffer Overflows - Cprogramming.com

    Tim S.
    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the Universe is winning." Rick Cook

Page 3 of 3 FirstFirst 123
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. What's wrong with my fseek() ?
    By barramundi9 in forum C Programming
    Replies: 5
    Last Post: 07-25-2011, 12:40 AM
  2. Reg. fseek
    By pokks in forum C Programming
    Replies: 1
    Last Post: 01-16-2006, 12:28 PM
  3. Help With fseek();
    By Explicit in forum C Programming
    Replies: 3
    Last Post: 05-26-2004, 08:40 PM
  4. fseek
    By Max in forum C Programming
    Replies: 5
    Last Post: 12-15-2003, 02:21 PM
  5. fseek ???
    By davie_scotland in forum C Programming
    Replies: 2
    Last Post: 02-19-2002, 05:13 PM

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