September 2018 2 30 Report

Język C++

Skąd błąd podczas kompilacji przy: system ("pause")?

Error: 'system' was not declared in this scope.

Używam w programie biblioteki iostream, korzystam z Deva. Czy to możliwe, żeby starsza wersja kompilatora dopuszczała taki zapis, a nowsza nie??

Czego brakuje w kodzie na przykład tego prostego programiku?

#include <iostream>
using namespace std;

main()

{
int i;
int tab[]={1, 2, 8, 9, 78};

int rozmiar=sizeof tab/sizeof(int);
cout<<"Liczba elementów tablicy wynosi: "<<rozmiar<<endl;

for(i=0; i<rozmiar; i++)
{
cout<<"\ttab["<<i<<"]= ";
cout<<tab[i]<<endl;
}

system ("pause");
}


More Questions From This User See All

gdzie jest błąd?<html><head></head><body><img src="europa.jpg" usemap="#mapa" /><map name="mapa_europy"><area href="http://pl.wikipedia.org/wiki/Islandia"shape="polygon" coords="226,109, 195,121, 214,145, 189,143, 201,164, 185,175, 206,193, 218,216, 244,215, 258,221, 288,225, 311,210, 320,191, 313,178, 322,167, 305,152, 291,157, 267,147, 257,150, 251,138, 227,149, 233,134"title="Islandia"><area href="http://pl.wikipedia.org/wiki/Irlandia" shape="polygon" coords="279,442, 258,447, 265,456, 252,461, 228,454, 226,468, 217,474, 224,489, 189,515, 201,537, 227,536, 265,540, 283,512, 290,483, 280,469, 264,470"title="Irlandia"><area href="http://pl.wikipedia.org/wiki/Wielka_Brytania"shape="polygon" coords="374,225, 354,234, 365,257, 453,301, 308,372, 269,464, 300,482, 316,493, 309,527, 311,549, 282,559, 320,588, 256,607, 298,616, 309,606, 328,614, 395,622, 409,609, 397,606, 424,574, 398,557, 400,511, 388,484, 381,448, 359,436, 378,432, 404,402, 371,385, 395,367"title="Wielka Brytania"><area href="http://pl.wikipedia.org/wiki/Portugalia"shape="polygon" coords="98,830, 32,972, 68,986, 143,854"title="Potugalia"><area href="http://pl.wikipedia.org/wiki/Hiszpania"shape="polygon" coords="135,786, 98,793, 116,844, 149,857, 127,874, 116,907, 96,914, 100,928, 84,949, 88,965, 71,977, 82,989, 102,1035, 136,1026, 196,1045, 225,1028, 241,1033, 249,1016, 388,989, 302,944, 373,923, 377,903, 331,878, 314,879, 273,845"title="Hiszpania"><area href="http://pl.wikipedia.org/wiki/Francja"shape="polygon" coords="416,623, 397,652, 370,661, 359,668, 335,648, 320,677, 297,661, 256,667, 282,702, 303,718, 303,748, 310,786, 273,844, 371,898, 389,875, 432,882, 461,893, 486,878, 482,812, 484,791, 466,797, 507,757, 529,715, 457,670, 416,628"title="Francja"></map></body></html>
Answer

Recommend Questions



Life Enjoy

" Life is not a problem to be solved but a reality to be experienced! "

Get in touch

Social

© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.