Comments (4)
Thanks @EpicWink.
There's something that doesn't make sense to me: How is it your compiler thinks that uint64_t
is an unsigned long
and not an unsigned long long
?
(I don't have Linux installed, so I can't poke around.)
from meshio.
Difference in data-model I guess: Unix 64-bit says long
is 64 bits, but Windows 64-bit and Unix/Windows 32-bit says long
is 32 bits; see Fundamental types and Fixed width integer types.
For me the following
#include<cstdint>
int main(int argc, char** argv) {
uint64_t *a;
unsigned long long b[3];
a = b + 2;
}
Gives me:
int.cpp: In function ‘int main(int, char**)’:
int.cpp:6:11: error: invalid conversion from ‘long long unsigned int*’ to ‘uint64_t*’ {aka ‘long unsigned int*’} [-fpermissive]
6 | a = b + 2;
| ~~^~~
| |
| long long unsigned int*
Whereas unsigned long
works fine. Likewise:
uint32_t
needsunsigned int
uint16_t
needsunsigned short
uint8_t
needsunsigned char
from meshio.
...and here I was thinking the whole purpose of the cstdint types was cross-platform compatibility. :-(
I don't tend to use them in my own stuff unless I have to interface with things that do... but I'm pretty old school :-)
from meshio.
cstdint types are the same on every platform. It's the fundamental C types which are different for some reason
from meshio.
Related Issues (7)
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 meshio.