ifstream files

This is a discussion on ifstream files within the C++ Programming forums, part of the General Programming Boards category; US keyboards are not standard, so don't go assuming everyone has a similar keyboard. Pot . . . kettle . ...

  1. #31
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,048
    US keyboards are not standard, so don't go assuming everyone has a similar keyboard.
    Pot . . . kettle . . . mantissa, sign, exponent

    It's a US IBM keyboard. The "\" and "|" characters are on the same key, just under the backspace key, which is not the easiest place to reach.
    Most newer laptops have two backslash keys, which I suppose are easier to reach: one next to the left shift key and one above the right one. I find I tend to hit them by accident, however.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  2. #32
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    22,918
    Quote Originally Posted by dwks View Post
    Pot . . . kettle . . . mantissa, sign, exponent
    Most keyboards have all the a...z keys in common. Note "most," some are exceptions such as Japanese and Chinese keyboards.
    But special keys such as "\" or "-" or "/" or "" aren't on the same place and doesn't exist on some keyboards
    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. #33
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Most keyboards have all the a...z keys in common.
    Not even that. German keyboards have y and z flipped in comparison to US keyboards.

    Basically, never make any assumptions about keyboards. Be nice to qwerty and qwertz, and don't forget the dvorak users out there. And when it comes to non-alphanumerics, all bets are off.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  4. #34
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    22,918
    Obviously, not all are same, but many keyboards tend to have the same layout for a...z (which definitely does not hold true for special keys which tend to be different on each keyboards). It's not a given, though, as we're witnessed.
    Ha... It's a shame they can't define a standard. Then we wouldn't have big problems.
    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.

  5. #35
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    I don't know if the US users would be happy with keys they have no use for taking up space.

    I definitely know I wouldn't be happy without my ö, ü, ä and ß, though.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  6. #36
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    22,918
    I hate when they always refer to US keyboard when setting shortcuts everywhere. Mostly because they don't always work with non-US keyboards.
    That's why I would like a standard
    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.

  7. #37
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,048
    US keyboards are probably the closest thing to a standard there is . . . .

    One solution is to say CTRL-@ instead of CTRL-SHIFT-2 or whatever.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  8. #38
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    One solution is to say CTRL-@ instead of CTRL-SHIFT-2 or whatever.
    Solution to what?
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  9. #39
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,048
    To this.
    I hate when they always refer to US keyboard when setting shortcuts everywhere. Mostly because they don't always work with non-US keyboards.
    The main reason I could see that this would be a problem would be if, say, your keyboard had '@' on a different key from a US keyboard.

    Of course, a keyboard might not even have a key entirely . . . .
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  10. #40
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    22,918
    @? Alt Gr + 2.
    ~? Alt Gr + ¨.
    \? Alt Gr + +.
    /? Shift + 7.
    I could go on forever.
    So these "shortcuts" never work. Not like they're expected to, anyway.
    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.

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

Similar Threads

  1. Create Copies of Files
    By Kanshu in forum C++ Programming
    Replies: 13
    Last Post: 05-09-2009, 08:53 AM
  2. Error opening files in a different dir
    By Ozzie in forum C++ Programming
    Replies: 3
    Last Post: 10-09-2008, 07:55 AM
  3. Working with muliple source files
    By Swarvy in forum C++ Programming
    Replies: 1
    Last Post: 10-02-2008, 09:36 AM
  4. Program Deployment and DLL/OCX Files?
    By dfghjk in forum C++ Programming
    Replies: 5
    Last Post: 06-16-2008, 03:47 AM
  5. ofstream and ifstream for searching and writing
    By johnnyd in forum C++ Programming
    Replies: 6
    Last Post: 03-17-2003, 08:34 AM

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