Открыть массив данных в cpp [закрыто]C++

Программы на C++. Форум разработчиков
Anonymous
Открыть массив данных в cpp [закрыто]

Сообщение Anonymous »

У меня есть массив, хранящийся в формате .txt, например

Код: Выделить всё

1.000000000000000000e+00 2.000000000000000000e+00 3.000000000000000000e+00
4.000000000000000000e+00 5.000000000000000000e+00 6.000000000000000000e+00
7.000000000000000000e+00 8.000000000000000000e+00 9.000000000000000000e+00
Я хочу открыть его в cpp с кодами:

Код: Выделить всё

int main() {
// Open the text file for reading
std::ifstream file("data.txt");

// Check if the file is opened successfully
if (!file.is_open()) {
std::cerr 

Подробнее здесь: [url]https://stackoverflow.com/questions/78473310/open-a-data-array-in-cpp[/url]

Вернуться в «C++»