Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
#include <iostream>
using namespace std;
struct foo{
int elem1;
int elem2;
};
void changeFoo(foo* toChange){
toChange->elem1 = 5;
toChange->elem2 = 2;
}
void initFoo(foo* toInit){
toInit->elem1 = 0;
toInit->elem2 = 0;
}
ostream& operator<<(ostream& cout, foo* toPrint){
cout << toPrint->elem1 << endl;
cout << toPrint->elem2;
return cout;
}
int main(){
foo* f = new foo;
initFoo(f);
cout << f << endl;
changeFoo(f);
cout << f << endl;
delete f;
}
~
#include <iostream>
using namespace std;
void changeFoo(int* toChange){
toChange[0] = 5;
toChange[1] = 2;
}
ostream& operator<<(ostream& cout, int* toPrint){
cout << toPrint[0] << endl;
cout << toPrint[1];
}
int main(){
int test[2] = {0,0};
cout << test << endl;
changeFoo(test);
cout << test << endl;
}