Thread: Sum of octals found in input

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,666
    > n = 'current'- 0;
    Why the single quotes?

    Why doesn't your compiler complain?
    C++ Shell
    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.

  2. #2
    Registered User
    Join Date
    Oct 2020
    Posts
    69
    Quote Originally Posted by Salem View Post
    > n = 'current'- 0;
    Why the single quotes?

    Why doesn't your compiler complain?
    C++ Shell
    Yeah, that was a mistake, I edited the code: n = current - '0'; But the problem remains the same

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 6
    Last Post: 07-22-2020, 05:17 PM
  2. comparing octals???
    By TaiL in forum C Programming
    Replies: 1
    Last Post: 10-13-2009, 12:55 PM
  3. Pq - Sq - Kq --- Found!!!
    By sean in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 12-02-2002, 07:07 PM
  4. Look what I found!
    By face_master in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 10-14-2002, 05:34 AM
  5. -lqt not found?
    By f0d in forum Linux Programming
    Replies: 2
    Last Post: 06-03-2002, 10:17 AM

Tags for this Thread