Quantcast
Viewing latest article 22
Browse Latest Browse All 25

Question regarding the Race Car project

Hey guys,
I have an up and running programme, so that’s all right. I was just wondering, at task 2, in the hint it says we can declare our string member variables with char*, but I couldn’t figure out how, so I ended up initialising my variables with:

struct Race{
int number_of_laps;
int current_lap;
char first_place[50];
char first_place_colour[20];
};

Now it works fine, yet still, for my own curiosity, I was wondering how I could have done it using char*.

1 post - 1 participant

Read full topic


Viewing latest article 22
Browse Latest Browse All 25

Trending Articles