Ir para conteúdo
Fórum Script Brasil
  • 0

Dados Vindo Do Scanf


mestre fyoda

Pergunta

Posts Recomendados

  • 0

também tinha pensado em fazer com a biblioteca do conio2.h mas ai que está instalei ela na pasta include do div coloquei no linker -lconio e não adiantou nada , da erro no #include <conio2.h> .

Por que você não instala ela por aquele pacote que eu te passei o link? Só tive que instalar por ele e colocar o -lconio no linker e pronto. E não tive que colocar nada na pasta include.

Abraços,

graymalkin

Link para o comentário
Compartilhar em outros sites

  • 0

o erro da exatamente aqui :

#include <conio2.h>

da esses erros :

Compilador: Default compiler

Building Makefile: "C:\Dev-Cpp\Makefile.win"

Executando make...

make.exe -f "C:\Dev-Cpp\Makefile.win" all

g++.exe -c teste1.cpp -o teste1.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include"

In file included from teste1.cpp:1:

C:/Dev-Cpp/include/conio2.h:30: error: conflicting declaration 'BLACK'

C:/Dev-Cpp/include/conio.h:47: error: 'BLACK' has a previous declaration as `COLORS BLACK'

C:/Dev-Cpp/include/conio2.h:30: error: declaration of `BLACK'

C:/Dev-Cpp/include/conio.h:47: error: conflicts with previous declaration `COLORS BLACK'

C:/Dev-Cpp/include/conio2.h:31: error: conflicting declaration 'BLUE'

C:/Dev-Cpp/include/conio.h:48: error: 'BLUE' has a previous declaration as `COLORS BLUE'

C:/Dev-Cpp/include/conio2.h:31: error: declaration of `BLUE'

C:/Dev-Cpp/include/conio.h:48: error: conflicts with previous declaration `COLORS BLUE'

C:/Dev-Cpp/include/conio2.h:32: error: conflicting declaration 'GREEN'

C:/Dev-Cpp/include/conio.h:49: error: 'GREEN' has a previous declaration as `COLORS GREEN'

C:/Dev-Cpp/include/conio2.h:32: error: declaration of `GREEN'

C:/Dev-Cpp/include/conio.h:49: error: conflicts with previous declaration `COLORS GREEN'

C:/Dev-Cpp/include/conio2.h:33: error: conflicting declaration 'CYAN'

C:/Dev-Cpp/include/conio.h:50: error: 'CYAN' has a previous declaration as `COLORS CYAN'

C:/Dev-Cpp/include/conio2.h:33: error: declaration of `CYAN'

C:/Dev-Cpp/include/conio.h:50: error: conflicts with previous declaration `COLORS CYAN'

C:/Dev-Cpp/include/conio2.h:34: error: conflicting declaration 'RED'

C:/Dev-Cpp/include/conio.h:51: error: 'RED' has a previous declaration as `COLORS RED'

C:/Dev-Cpp/include/conio2.h:34: error: declaration of `RED'

C:/Dev-Cpp/include/conio.h:51: error: conflicts with previous declaration `COLORS RED'

C:/Dev-Cpp/include/conio2.h:35: error: conflicting declaration 'MAGENTA'

C:/Dev-Cpp/include/conio.h:52: error: 'MAGENTA' has a previous declaration as `COLORS MAGENTA'

C:/Dev-Cpp/include/conio2.h:35: error: declaration of `MAGENTA'

C:/Dev-Cpp/include/conio.h:52: error: conflicts with previous declaration `COLORS MAGENTA'

C:/Dev-Cpp/include/conio2.h:36: error: conflicting declaration 'BROWN'

C:/Dev-Cpp/include/conio.h:53: error: 'BROWN' has a previous declaration as `COLORS BROWN'

C:/Dev-Cpp/include/conio2.h:36: error: declaration of `BROWN'

C:/Dev-Cpp/include/conio.h:53: error: conflicts with previous declaration `COLORS BROWN'

C:/Dev-Cpp/include/conio2.h:37: error: conflicting declaration 'LIGHTGRAY'

C:/Dev-Cpp/include/conio.h:54: error: 'LIGHTGRAY' has a previous declaration as `COLORS LIGHTGRAY'

C:/Dev-Cpp/include/conio2.h:37: error: declaration of `LIGHTGRAY'

C:/Dev-Cpp/include/conio.h:54: error: conflicts with previous declaration `COLORS LIGHTGRAY'

C:/Dev-Cpp/include/conio2.h:38: error: conflicting declaration 'DARKGRAY'

C:/Dev-Cpp/include/conio.h:55: error: 'DARKGRAY' has a previous declaration as `COLORS DARKGRAY'

C:/Dev-Cpp/include/conio2.h:38: error: declaration of `DARKGRAY'

C:/Dev-Cpp/include/conio.h:55: error: conflicts with previous declaration `COLORS DARKGRAY'

C:/Dev-Cpp/include/conio2.h:39: error: conflicting declaration 'LIGHTBLUE'

C:/Dev-Cpp/include/conio.h:56: error: 'LIGHTBLUE' has a previous declaration as `COLORS LIGHTBLUE'

C:/Dev-Cpp/include/conio2.h:39: error: declaration of `LIGHTBLUE'

C:/Dev-Cpp/include/conio.h:56: error: conflicts with previous declaration `COLORS LIGHTBLUE'

C:/Dev-Cpp/include/conio2.h:40: error: conflicting declaration 'LIGHTGREEN'

C:/Dev-Cpp/include/conio.h:57: error: 'LIGHTGREEN' has a previous declaration as `COLORS LIGHTGREEN'

C:/Dev-Cpp/include/conio2.h:40: error: declaration of `LIGHTGREEN'

C:/Dev-Cpp/include/conio.h:57: error: conflicts with previous declaration `COLORS LIGHTGREEN'

C:/Dev-Cpp/include/conio2.h:41: error: conflicting declaration 'LIGHTCYAN'

C:/Dev-Cpp/include/conio.h:58: error: 'LIGHTCYAN' has a previous declaration as `COLORS LIGHTCYAN'

C:/Dev-Cpp/include/conio2.h:41: error: declaration of `LIGHTCYAN'

C:/Dev-Cpp/include/conio.h:58: error: conflicts with previous declaration `COLORS LIGHTCYAN'

C:/Dev-Cpp/include/conio2.h:42: error: conflicting declaration 'LIGHTRED'

C:/Dev-Cpp/include/conio.h:59: error: 'LIGHTRED' has a previous declaration as `COLORS LIGHTRED'

C:/Dev-Cpp/include/conio2.h:42: error: declaration of `LIGHTRED'

C:/Dev-Cpp/include/conio.h:59: error: conflicts with previous declaration `COLORS LIGHTRED'

C:/Dev-Cpp/include/conio2.h:43: error: conflicting declaration 'LIGHTMAGENTA'

C:/Dev-Cpp/include/conio.h:60: error: 'LIGHTMAGENTA' has a previous declaration as `COLORS LIGHTMAGENTA'

C:/Dev-Cpp/include/conio2.h:43: error: declaration of `LIGHTMAGENTA'

C:/Dev-Cpp/include/conio.h:60: error: conflicts with previous declaration `COLORS LIGHTMAGENTA'

C:/Dev-Cpp/include/conio2.h:44: error: conflicting declaration 'YELLOW'

C:/Dev-Cpp/include/conio.h:61: error: 'YELLOW' has a previous declaration as `COLORS YELLOW'

C:/Dev-Cpp/include/conio2.h:44: error: declaration of `YELLOW'

C:/Dev-Cpp/include/conio.h:61: error: conflicts with previous declaration `COLORS YELLOW'

C:/Dev-Cpp/include/conio2.h:46: error: conflicting declaration 'WHITE'

C:/Dev-Cpp/include/conio.h:63: error: 'WHITE' has a previous declaration as `COLORS WHITE'

C:/Dev-Cpp/include/conio2.h:46: error: declaration of `WHITE'

C:/Dev-Cpp/include/conio.h:63: error: conflicts with previous declaration `COLORS WHITE'

C:/Dev-Cpp/include/conio2.h:46: error: conflicting declaration 'typedef enum COLORS COLORS'

C:/Dev-Cpp/include/conio.h:63: error: 'COLORS' has a previous declaration as `typedef enum COLORS COLORS'

C:/Dev-Cpp/include/conio2.h:46: error: declaration of `typedef enum COLORS COLORS'

C:/Dev-Cpp/include/conio.h:63: error: conflicts with previous declaration `typedef enum COLORS COLORS'

C:/Dev-Cpp/include/conio2.h:46: error: declaration of `typedef enum COLORS COLORS'

C:/Dev-Cpp/include/conio.h:63: error: conflicts with previous declaration `typedef enum COLORS COLORS'

In file included from teste1.cpp:1:

C:/Dev-Cpp/include/conio2.h:56:1: warning: "cscanf" redefined

In file included from C:/Dev-Cpp/include/conio2.h:16,

from teste1.cpp:1:

C:/Dev-Cpp/include/conio.h:79:1: warning: this is the location of the previous definition

In file included from teste1.cpp:1:

C:/Dev-Cpp/include/conio2.h:88:1: warning: "_SOLIDCURSOR" redefined

In file included from C:/Dev-Cpp/include/conio2.h:16,

from teste1.cpp:1:

C:/Dev-Cpp/include/conio.h:76:1: warning: this is the location of the previous definition

In file included from teste1.cpp:1:

C:/Dev-Cpp/include/conio2.h:89:1: warning: "_NORMALCURSOR" redefined

In file included from C:/Dev-Cpp/include/conio2.h:16,

from teste1.cpp:1:

C:/Dev-Cpp/include/conio.h:77:1: warning: this is the location of the previous definition

C:/Dev-Cpp/include/conio2.h:97: error: redefinition of `struct text_info'

C:/Dev-Cpp/include/conio.h:32: error: previous definition of `struct text_info'

C:/Dev-Cpp/include/conio2.h:189: error: declaration of C function `void puttext(int, int, int, int, char_info*)' conflicts with

C:/Dev-Cpp/include/conio.h:110: error: previous declaration `int puttext(int, int, int, int, void*)' here

C:/Dev-Cpp/include/conio2.h:201: error: declaration of C function `void movetext(int, int, int, int, int, int)' conflicts with

C:/Dev-Cpp/include/conio.h:103: error: previous declaration `int movetext(int, int, int, int, int, int)' here

C:/Dev-Cpp/include/conio2.h:283: error: declaration of C function `char* getpass(const char*, char*)' conflicts with

C:/Dev-Cpp/include/conio.h:91: error: previous declaration `char* getpass(const char*)' here

make.exe: *** [teste1.o] Error 1

Execução terminada

Link para o comentário
Compartilhar em outros sites

  • 0

hehe não entendi , desculpe .

o que devo faser ?

Volte com a conio original do Dev-C++, ou seja, apague essa "atualizada" que você colocou e reinstale o Dev-C++. Depois instale a conio 2.0 e deverá funcionar (igual funcionou aqui comigo, já que eu não fiz nada além de instalar o Dev-C++ e ela).

Abraços,

Graymalkin

Link para o comentário
Compartilhar em outros sites

  • 0

é mas essa conio2.h ela é completa ?

Como assim "completa"? Você pode olhar na documentação dela se ela tem todas as funções que você precisa. Ou, se a sua conio "atualizada" for mais completa que ela, você pode continuar utilizando-a. Eu só sugeria a conio2 porque a conio do Dev-C++ é incompleta, mas se você arrumou outra você pode utilizá-la.

Abraços,

Graymalkin

Link para o comentário
Compartilhar em outros sites

  • 0

deletei o programa pelo painel de contrle , e apaguei o registro do devcpp . e depois instalei o devcpp.

coloquei esse codigo que você me passou .

#include <conio2.h>

int main()

{

textcolor(YELLOW);

cputsxy(10, 10, "um teste");

getch();

}

deu erro :

Compilador: Default compiler

Building Makefile: "C:\Dev-Cpp\Makefile.win"

Executando make...

make.exe -f "C:\Dev-Cpp\Makefile.win" all

g++.exe -c Projeto.cpp -o Projeto.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include"

g++.exe Projeto.o -o "Projeto1.exe" -L"C:/Dev-Cpp/lib"

Projeto.o(.text+0x32):Projeto.cpp: undefined reference to `textcolor'

Projeto.o(.text+0x4e):Projeto.cpp: undefined reference to `cputsxy'

collect2: ld returned 1 exit status

make.exe: *** [Projeto1.exe] Error 1

Execução terminada

outra coisa estranha se eu instala a biblioteca que você me passo e deixa a biblioteca zuado do devcpp , ai não funciona o banco de dados .

Link para o comentário
Compartilhar em outros sites

  • 0

deu certo mas agora está dando erro na conexao do bd .

Compilador: Default compiler

Building Makefile: "C:\Dev-Cpp\Makefile.win"

Executando make...

make.exe -f "C:\Dev-Cpp\Makefile.win" all

g++.exe -c projeto.cpp -o projeto.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include"

In file included from C:/Dev-Cpp/include/mysql/mysql.h:57,

from projeto.cpp:6:

C:/Dev-Cpp/include/mysql/mysql_com.h:155: error: `SOCKET' does not name a type

C:/Dev-Cpp/include/mysql/mysql_com.h:299: error: `SOCKET' was not declared in this scope

C:/Dev-Cpp/include/mysql/mysql_com.h:299: error: expected primary-expression before "const"

C:/Dev-Cpp/include/mysql/mysql_com.h:299: error: expected primary-expression before "unsigned"

C:/Dev-Cpp/include/mysql/mysql_com.h:300: error: expected primary-expression before "unsigned"

C:/Dev-Cpp/include/mysql/mysql_com.h:300: error: initializer expression list treated as compound expression

projeto.cpp: In function `int consolefull()':

projeto.cpp:43: error: `VK_MENU' undeclared (first use this function)

projeto.cpp:43: error: (Each undeclared identifier is reported only once for each function it appears in.)

projeto.cpp:43: error: `keybd_event' undeclared (first use this function)

projeto.cpp:44: error: `VK_RETURN' undeclared (first use this function)

projeto.cpp:45: error: `KEYEVENTF_KEYUP' undeclared (first use this function)

make.exe: *** [projeto.o] Error 1

Execução terminada

eu coloquei la no linker -lmysql

estranho se eu instala a conio 1_31 funciona normal .

Link para o comentário
Compartilhar em outros sites

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,3k
    • Posts
      652,3k
×
×
  • Criar Novo...