Thread: checking if this is a typo in the C++ book

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Jul 2018
    Posts
    2

    checking if this is a typo in the C++ book

    Hi! I'm trying to learn C++ and would like to check if this is a typo from page 135 of the ebook as it's really confusing me.

    https://i.imgur.com/MS6uueB.png

    Is the 2nd line of the code supposed to be this?

    int *p_x = & x;

    Or is it also ok to declare pointers without the *?

    Thanks!
    Last edited by kigwa; 07-29-2018 at 07:40 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Homework typo
    By fetahi3212 in forum C++ Programming
    Replies: 2
    Last Post: 01-12-2017, 03:09 AM
  2. Typo on C-FAQ
    By ssharish2005 in forum General Discussions
    Replies: 3
    Last Post: 06-06-2011, 05:24 PM
  3. basic recursion function question. typo in book?
    By navyzack in forum C Programming
    Replies: 6
    Last Post: 04-18-2005, 11:07 AM
  4. typo on faq
    By chrismiceli in forum Linux Programming
    Replies: 2
    Last Post: 10-06-2003, 03:23 PM
  5. typo
    By ygfperson in forum C++ Programming
    Replies: 2
    Last Post: 04-18-2002, 01:25 AM

Tags for this Thread