コード例 #1
0
ファイル: main.cpp プロジェクト: rLadia/Movie
int main()
{
  std::ifstream movie_data("data4movies.txt");
  std::ifstream customer_data("data4customers.txt");
  std::ifstream action_data("data4commands.txt");

  if(!movie_data) {
    std::cout << "data4movies.txt could not be opened\n";
    return 1;
  }

  if(!customer_data) {
    std::cout << "data4customers.txt could not be opened\n";
    return 1;
  }

  if(!action_data) {
    std::cout << "data4commands.txt could not be opened\n";
    return 1;
  }

  Store store;

  store.AddMovies(movie_data);
  store.AddCustomers(customer_data);
  store.ProcessActions(action_data);

  return 0;
}
コード例 #2
0
ファイル: strings.c プロジェクト: schmjdt/csc240
int main() {
    // --- Part 1 ---
    char mine[] = "Hi\tworld,\nHave a great day!";

    printf("Before:\n%s\n\n", mine);

    printf("After:\n");
    escape(&mine);

    printf("\n\n");
    // --- Part 2 ---
    myVars();

    printf("\n\n");
    // --- Part 3 ---
    movie_t myMovie;
    myMovie = movie_data(myMovie);
    printf("\n\n");
    movie_display(myMovie);

    return 0;
}