![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Game engine designer
Join Date: May 2005
Location: Sweden
Posts: 313
Rep Power: 4
![]() |
[x86] Arrays to functions
How do I call a function with an array as argument?
I have been written this code, but it does'nt work of course... #include <iostream>
void printArray(float m[])
{
std::cout << m[0] << std::endl;
std::cout << m[1] << std::endl;
std::cout << m[2] << std::endl;
}
int main()
{
float m1 = 3, m2 = 2, m3 = 9;
_asm
{
push m3 ; How should I prepare the floats?
push m2
push m1
call printArray
}
system("pause");
return 0;
}/Klarre |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|