Notice
Recent Posts
Recent Comments
Link
목록new (1)
빙수달 게임 개발 노트
세 개의 CandyBar 구조체를 원소로 가지는 배열을 선언하는 대신 new를 사용하여 그 배열을 동적으로 대입하라.#include #include #include using namespace std;struct Candybar{ string name;; double weight; int kcalory;};int main() { Candybar* snack = new Candybar[3]; snack[0].name = "Mocha Munch"; snack[0].weight = 2.5; snack[0].kcalory = 350; snack[1].name = "Swing Chip"; snack[1].weight = 1.8; snack[1].kcalory = 250;..
Programming/C++
2024. 12. 15. 16:03