There is a program that after closing opens one window in dev-c ++ through the command

system("start http://google.ru "); 

How to open more than one window through the condition for? Full noob, please help with this.

Moved from comment.

 /* * Copyright © */ #include <stdio.h> #define PI 3.1415 main() { // cor do cmd (verde) system("color 2"); // variaveis decimais float circu, perim, raio, area; int i; if (circu <= 0) { printf("O numero que indicou esta invalido!"); } else { printf("Insira o diametro da circunferencia: "); scanf("%f", &circu); // ... } // pause system("PAUSE"); for (size_t i = 0, i < 100, ++i) { system("start http://google.ru "); } } 

Gives an error, work in dev - c ++ (c)

  • one
    What kind of error produces? We are not psychics. - First, in c ++ the main function must return an int. - Secondly, you have in your code defined 2 variables with the same name i. - Thirdly, the ellipsis also needs to be removed. - Roman Goriachevskiy
  • one
    Add #include <cstdlib> at the beginning using namespace std; - skegg
  • five
    The for loop must not be commas, but semicolons. In this case, the answer is all correct. - gammaker

1 answer 1

Probably so. The idea is to open 10 windows.

 #include <iostream> int main() { for (size_t i = 0; i < 10; ++i) { system("start http://google.ru "); } } 
  • and why for the size_t loop? why didn't you select int? - ProkletyiPirat
  • Checked in MinGW, everything works correctly. - skegg
  • Moved to the question. - extazys