저는 C++을 배우고 있습니다 만 그래픽 C++ 개발이 너무 어렵 기 때문에 콘솔 앱을 개발합니다. 그런 다음 Palm OS 용 애플리케이션과 같은 콘솔을 개발할 수 있는지 알고 싶습니다. Palm OS 용으로이 코드를 컴파일하면됩니다.Palm OS 용 애플리케이션 개발 콘솔
// ClientFille.cpp
// Cria um arquivo sequencial.
#include <iostream>
using std::cerr;
using std::cin;
using std::cout;
using std::endl;
using std::ios;
#include <fstream> // Fluxo de arquivos
using std::ofstream; // Gera a saída do fluxo do arquivo
#include <cstdlib>
using std::exit; // Sai do protótipo de funcão
int main()
{
// Construtor ofstream abre arquivo
ofstream outClientFile("Clients.dat", ios::out);
// Fecha o programa se não conseguir criar o arquivo
if (!outClientFile) // Operador ! sobrecarregado
{
cerr << "File could not be opened" << endl;
exit(1);
} // Fim do if
cout << "Enter the account, name, and balance." << endl
<< "Enter end-of-file to end the input.\n? ";
int account;
char name[ 30 ];
double balance;
// Lê conta, nome e saldo a partir de cin, então coloca no arquivo
while (cin >> account >> name >> balance)
{
outClientFile << account << ' ' << name << ' ' << balance << endl;
cout << "? ";
} // Fim do while
return 0; // Destruitor ofstream fecha o arquivo
} // Fim de main
고마워요!
다음 자신의 컴파일러 인 자신의 OS를 개발하는 데 1 분. 그리고 이제 Palm에 C++ 응용 프로그램을 작성합니다! Nathan과 절대로 어리석은 순간은 없습니다. –