Comments (7)
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.
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.
我觉着你们俩可以用中文讨论来着:)
from cppprimer.
@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.
好的,非常感谢!我有些新的问题请教您,我又提了两个问题在知乎上邀请您回答了,如果有时间的话,麻烦您了。
from cppprimer.
@cxs944745612 真的抱歉,周末有些事耽搁了,明天我帮你看看~ 🏇
from cppprimer.
没事没事,您有时间就看,非常感谢您的无私帮助!
from cppprimer.
Related Issues (20)
- ex16_29 include error file,It compile failed HOT 2
- about 16.2.7 HOT 2
- Exercise 7.36
- Exercise 6.53
- Exercise 5.3 correct answer HOT 1
- Ex 6_8 HOT 1
- Ex 6_9 (added #include "fact.cpp")
- Ex 6_10 (added "return 0;")
- Exercise 13.37
- Answer to Exercises 3.37 is not entirely true.
- Ex16.49
- The new soulution of Exercise 5.12
- Ex.7.53 will not compile under the C++14 standard
- #include<exception>
- ex7_22.h 'class' instead of 'struct'
- Bug report exercise 16.12
- An error in exercise 16.28, in file <unique_pointer.h>
- Small modification for answer of Exercise 3.9 - mention `s` is a empty string
- Exercise 9.28(The loop may not stop)
- terminate called after throwing an instance of 'std::bad_alloc
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cppprimer.