hidden text to trigger early load of fonts ПродукцияПродукцияПродукцияПродукция Các sản phẩmCác sản phẩmCác sản phẩmCác sản phẩm المنتجاتالمنتجاتالمنتجاتالمنتجات מוצריםמוצריםמוצריםמוצרים
Intel® oneAPI DPC++/C++ Compiler
Talk to fellow users of Intel® oneAPI DPC++/C++ Compiler and companion tools like Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and Intel® Distribution for GDB*
742 Discussions

invalid operands to binary expression ('int' and 'int *')

pril
Novice
6 825 Visites

Hi 

I have declared like this 

int sum_x=220;

int*another_one=malloc_shared<int>(N, q);

//Than I have place a value  of  300 inside  another_one[0]  after doing some computations in parallel_for() 
.

// outside of parralel for loop i am trying to multiply the two together  and store it in final_total

int final_total= sum_x *  another_one[0] ;


I am getting this error  not too sure how to cast this ints  so this two add up .

error: invalid operands to binary expression ('int' and 'int *')






 

 

 

 

 

Étiquettes (1)
0 Compliments
1 Solution
pril
Novice
6 814 Visites

Please disregard  this question .
I had a typo in my ide .
can close this   

Voir la solution dans l'envoi d'origine

0 Compliments
2 Réponses
pril
Novice
6 815 Visites

Please disregard  this question .
I had a typo in my ide .
can close this   

0 Compliments
GouthamK_Intel
Modérateur
6 801 Visites

Hi, 

Thanks for the confirmation!

Glad to know that your issue is resolved.

We will no longer respond to this thread. If you require any additional assistance from Intel, please start a new thread. 

Any further interaction in this thread will be considered community only. 

Have a Good day.


Thanks & Regards

Goutham


0 Compliments
Répondre