Quantcast
Channel: Intel® Software - Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 2797

Initialization of arrays

$
0
0

I've encountered a wierd problem. When I was doing:

double p[]={1.d, 2.d, 3.d, 4.d, 5.d};//or even double p[5] = blahblahblah...

And then I made a for loop to check the values of array p, I got all zeros. This is a problem that I abstract during the debugging. In fact, this happens   when I use icc or icpc to compile, on the contrary, the it truns out that everything is fine with gcc or g++. I'm so confused...

I'm using icc version 13.1.0. 

Thank you for your comments!


Viewing all articles
Browse latest Browse all 2797

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>