Розмір відео: 1280 X 720853 X 480640 X 360
Показувати елементи керування програвачем
Автоматичне відтворення
Автоповтор
#include struct Car{ std::string model; int year; std::string color;};void printCar(Car &car);void paintCar(Car &car, std::string color);int main () { Car car1; Car car2; car1.model = "Mustang"; car1.year = 2023; car1.color = "red"; car2.model = "Corvette"; car2.year = 2024; car2.color = "blue"; paintCar(car1, "silver"); paintCar(car2, "gold"); printCar(car1); printCar(car2); return 0;}void printCar(Car &car){ std::cout
Struts are value types when passing to functions/methods and need the ( Type &local_variable ) to pass the Pointer/address In C# this would be egregious but this is C++ baby, I need all the help I can get
Good Video but you could've showed more the code from above where you refered from. Other than that good Video.
struct Weapon{std::string modle;double fireRate;bool isAuto;}void Shoot(Weapon){Weapon weapon1;weapon1;weapon1;weapon1;
my brain rotted
me too
#include struct player{ std::string name; int age; std::string team;};void printPlayer(player player);void changeTeam(player &player, std::string team);int main(){ player player1; player1.name = "Messi"; player1.age = 38; player1.team = "Barcelona"; player player2; player2.name = "Ronaldo"; player2.age = 40; player2.team = "Real Madrid"; changeTeam(player1, "Inter Miami"); changeTeam(player2, "Al Nassr"); printPlayer(player1); printPlayer(player2); return 0;}void printPlayer(player player){ std::cout
#include
struct Car{
std::string model;
int year;
std::string color;
};
void printCar(Car &car);
void paintCar(Car &car, std::string color);
int main () {
Car car1;
Car car2;
car1.model = "Mustang";
car1.year = 2023;
car1.color = "red";
car2.model = "Corvette";
car2.year = 2024;
car2.color = "blue";
paintCar(car1, "silver");
paintCar(car2, "gold");
printCar(car1);
printCar(car2);
return 0;
}
void printCar(Car &car){
std::cout
Struts are value types when passing to functions/methods and need the ( Type &local_variable ) to pass the Pointer/address
In C# this would be egregious but this is C++ baby, I need all the help I can get
Good Video but you could've showed more the code from above where you refered from. Other than that good Video.
struct Weapon
{
std::string modle;
double fireRate;
bool isAuto;
}
void Shoot(Weapon)
{
Weapon weapon1;
weapon1;
weapon1;weapon1;
my brain rotted
me too
#include
struct player{
std::string name;
int age;
std::string team;
};
void printPlayer(player player);
void changeTeam(player &player, std::string team);
int main(){
player player1;
player1.name = "Messi";
player1.age = 38;
player1.team = "Barcelona";
player player2;
player2.name = "Ronaldo";
player2.age = 40;
player2.team = "Real Madrid";
changeTeam(player1, "Inter Miami");
changeTeam(player2, "Al Nassr");
printPlayer(player1);
printPlayer(player2);
return 0;
}
void printPlayer(player player){
std::cout