Simple question, LINE_MAX

This is a discussion on Simple question, LINE_MAX within the C Programming forums, part of the General Programming Boards category; Hi, just a quick question. There's 4 threads with LINE_MAX on this forum, though none show me where it's defined. ...

  1. #1
    1ST R. vd Kooij
    Join Date
    Mar 2006
    Location
    Netherlands
    Posts
    154

    Simple question, LINE_MAX

    Hi, just a quick question. There's 4 threads with LINE_MAX on this forum, though none show me where it's defined.

    `LINE_MAX' undeclared (first use this function)
    Which header file should I include?

    I've tried these:
    #include <stdio.h>
    #include <conio.h>
    #include <time.h>
    #include <stdint.h>
    #include <stdlib.h>
    #include <string.h>
    #include <strings.h>
    #include <windows.h>
    #include <direct.h>
    #include <limits.h>
    #include <fcntl.h>
    #include <sys/types.h>
    #include <sys/stat.h>
    #include <unistd.h>

    Thanks!

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,845
    Define it as some garbage value, then include all those header files and see which one complains about the redeclaration

    It's not a standard name as far as I know, so it could be anything (or nothing at all).
    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. #3
    1ST R. vd Kooij
    Join Date
    Mar 2006
    Location
    Netherlands
    Posts
    154
    Quote Originally Posted by Salem
    Define it as some garbage value, then include all those header files and see which one complains about the redeclaration

    It's not a standard name as far as I know, so it could be anything (or nothing at all).
    Hehe I've tried that procedure, but none of 'em complains about redeclaration. :/
    That's why I thought I'm missing the right header file.

  4. #4
    Slave MadCow257's Avatar
    Join Date
    Jan 2005
    Posts
    735

  5. #5
    1ST R. vd Kooij
    Join Date
    Mar 2006
    Location
    Netherlands
    Posts
    154
    Quote Originally Posted by MadCow257
    Thanks. I've never heard of that though . Plus I cant find it in the link you sent. I just wanted to use an example I found on the internet for reading a line from an input stream. That one used LINE_MAX as definition for the line length....

    I'll try another method. I'm so damn stuck atm, damn it.

    Thanks for your help.

  6. #6
    Slave MadCow257's Avatar
    Join Date
    Jan 2005
    Posts
    735
    try setting it to 80 and see what happens

  7. #7
    1ST R. vd Kooij
    Join Date
    Mar 2006
    Location
    Netherlands
    Posts
    154
    Thanks, so stupid I didnt think of that myself.... Im afraid I just deleted that bit from my code though :/ this is just one of those days.....
    http://www.f1rstracing.nl/
    OS: Windows XP
    Compiler: Dev-C++

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Simple question regarding variables
    By Flakster in forum C++ Programming
    Replies: 10
    Last Post: 05-18-2005, 09:10 PM
  2. Simple class question
    By 99atlantic in forum C++ Programming
    Replies: 6
    Last Post: 04-21-2005, 12:41 AM
  3. Simple question about pausing program
    By Noid in forum C Programming
    Replies: 14
    Last Post: 04-02-2005, 09:46 AM
  4. simple question.
    By InvariantLoop in forum Windows Programming
    Replies: 4
    Last Post: 01-31-2005, 12:15 PM
  5. simple fgets question
    By theweirdo in forum C Programming
    Replies: 7
    Last Post: 01-27-2002, 06:58 PM

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