Helio Posted February 16, 2020 at 06:23 PM Report Share #617363 Posted February 16, 2020 at 06:23 PM (edited) Boa tarde pessoal, estou precisando de ajuda com a declaração de uma variável int... Tenho um array de 10 posições do tipo 'const ' e preciso usar cada uma das posições para definir o tamanho de uma variável array int... Mas não está funcionando... O que eu fiz : #define _GNU_SOURCE // necessário porque getline() é extensão GNU #include<stdio.h> #include<stdlib.h> #include<string.h> #include<iostream> #include<fstream> #include<math.h> #include <limits> #include <windows.h> const int IND_TAM=5, /* ESTE EU VOU MUDAR 'A MÃO' EM CADA EXECUÇÃO */ MAX_TAM[10]={10,15,200,300,320,410,770,400,220,90} int VETOR_INTERNO[MAX_TAM[IND_TAM]], CONTADOR_INTERNO, CONTADOR_EXTERNO; .... Mas o Code Blocks emite erro... "VETOR_INTERNO NÃO FOI DECLARADO" Tem como resolver ? ? ? Abraços, Hélio Edited February 17, 2020 at 09:29 AM by M6 Formatação de código. Link to comment Share on other sites More sharing options...
M6 Posted February 17, 2020 at 09:31 AM Report Share #617366 Posted February 17, 2020 at 09:31 AM Eu diria que se necessitas de um array com tamanho dinâmico talvez necessites de usar apontadores. 10 REM Generation 48K! 20 INPUT "URL:", A$ 30 IF A$(1 TO 4) = "HTTP" THEN PRINT "400 Bad Request": GOTO 50 40 PRINT "404 Not Found" 50 PRINT "./M6 @ Portugal a Programar." Link to comment Share on other sites More sharing options...
HappyHippyHippo Posted February 18, 2020 at 10:51 PM Report Share #617380 Posted February 18, 2020 at 10:51 PM não percebi a tua segunda linha do post que define o teu objectivo ... desculpa IRC : sim, é algo que ainda existe >> #p@p Portugol Plus Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now