Thread: When do I specifically use Pointers?

  1. #31
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    So basically, non-pointer variables are limited by memory, and pointers are free to use as much memory? so to speak?
    Any variable, including a pointer, has a given size. A pointer may point to a region of memory only limited by what is available to the program.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  2. #32
    Registered User
    Join Date
    May 2008
    Posts
    141
    Quote Originally Posted by laserlight View Post
    Any variable, including a pointer, has a given size. A pointer may point to a region of memory only limited by what is available to the program.
    You guys should definitely consider a thanks button. I'm having the urge to do it.

  3. #33
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Make a good quote to thank someone
    Like
    "Thanks laserlight! How the hell do you know everything?!"
    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.

  4. #34
    Registered User
    Join Date
    May 2008
    Posts
    141
    Quote Originally Posted by Elysia View Post
    Make a good quote to thank someone
    Like
    "Thanks laserlight! How the hell do you know everything?!"

    Yeah, and I could give others who are trying to learn C/C++ programming aswell, a recommendation to go to cprogramming.com, and the forums for help.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Staticly Bound Member Function Pointers
    By Polymorphic OOP in forum C++ Programming
    Replies: 29
    Last Post: 11-28-2002, 01:18 PM
  2. API "Clean Up" Functions & delete Pointers :: Winsock
    By kuphryn in forum Windows Programming
    Replies: 2
    Last Post: 05-10-2002, 06:53 PM
  3. Pointers pointers pointers...
    By SMurf in forum C Programming
    Replies: 8
    Last Post: 10-23-2001, 04:55 PM