#include <iostream>
using namespace std;
typedef struct account_ {
float balance;
} account;
void change(struct account_ *)
{
?????->balance = "2.5";
}
int main()
{
account *jyske = new account;
test->balance = 0.2;
cout<<test->balance<<endl;
change(test);
cout<<test->balance<<endl;
delete test;
system("pause");
return 0;
}
Hvad skal jeg gøre for at ændre balance inde i en funktion?
Mvh
Lasse
[Redigeret d. 04/07-05 12:18:32 af Lasse Staal]