No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Hi! I'm making a table. I originally have some names. [CODE] #include <iostream> #include <cstring> using namespace std; char passengerName[100][100]; void main() { strcpy(passengerName[1], "Peter Tam"); strcpy(passengerName[2], "David Morris"); strcpy(passengerName[3], "Susan Leung"); strcpy(passengerName[4], "Timothy Kin"); strcpy(passengerName[5], "Mary Poon"); strcpy(passengerName[6], "Pretty Godson"); strcpy(passengerName[7], "Tammy Leung"); strcpy(passengerName[8], "Hugh Boss"); strcpy(passengerName[9], "John Cheng"); … |
|
I want to make a table like this: Seq. Name Class Seat VIP? Mileage(km) ==== =============== ===== ==== ====== ========== 1. Peter B 5A VIP 1046km 2. David F 1A VIP 2150km ...... Do I need to use for loop, strncpy to do so? Or do I need to use … |
|
I need to write a poker game that simulates a penalty kick in a soccer match. Three cards are drawn randomly. [CODE] void DrawCard(int& numberOne, int& numberTwo, int& numberThree) { RandNoGen(); //init random number generator numberOne = rand() % 13 + 1; //random number in [1, 13] do { numberTwo … |