Git Product home page Git Product logo

Comments (7)

pezy avatar pezy commented on May 22, 2024

Hi, @cxs944745612 Good to see you. 😄

1 and 2, you are right, and I have tried to fix it.

3 int *const p2 = &i2, we can judge the variable type according by it's name. Or, the question make no sense. Thus, i2 should be an integer, rather than double as you say.

4 I can't sure whether it will appear this error message. I am try to list the related codes as following:

const int v2 = 0;
int v1 = v2;
int &r1 = v1;
// above is previous exercise (Exercise 2.30)
r1 = v2;

Use Clang 3.5 and gcc 4.9.2, All passed. Could you please tell me what environment do you have?

Thx a lot for bug reporting. 👍

from cppprimer.

 avatar commented on May 22, 2024

I'm very sorry ,it's my fault .You're right!
what's more,you say"we can judge the variable type according by it's name",it means that we keep i2 as a default integer variable .( i: integer, d: double, f: float. so d2 is a double variable in c++ primer ? like this?)
My English level is very poor , so can you understand what I want to express? I really want to say Chinese ! thanks a lot for your guidance!

from cppprimer.

jjjasperd avatar jjjasperd commented on May 22, 2024

我觉着你们俩可以用中文讨论来着:)

from cppprimer.

pezy avatar pezy commented on May 22, 2024

@cxs944745612 @jjjasperd

那咱们以后就用中文吧~ 🇨🇳

i: integer, d: double, f: float. so d2 is a double variable in c++ primer ? like this?

是的,就是这样,这本书的命名很讲究,也为初学者培养好不乱命名的好习惯。除了你提到的,第二章里,还有 r 代表 reference, c 代表 const, p 代表 pointer.

from cppprimer.

 avatar commented on May 22, 2024

好的,非常感谢!我有些新的问题请教您,我又提了两个问题在知乎上邀请您回答了,如果有时间的话,麻烦您了。

from cppprimer.

pezy avatar pezy commented on May 22, 2024

@cxs944745612 真的抱歉,周末有些事耽搁了,明天我帮你看看~ 🏇

from cppprimer.

 avatar commented on May 22, 2024

没事没事,您有时间就看,非常感谢您的无私帮助!

from cppprimer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.