| | |
struct problem
Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Jul 2008
Posts: 60
Reputation:
Solved Threads: 0
code is:
and the errors are:
and yes, im usin visual c++ 6.0
now, tinkin.. the version has somethin to do with this or is somethin else?
C++ Syntax (Toggle Plain Text)
// maximo_ventas.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> #include <vector> using namespace std; void ingresar_gente (); void comparar_datos (int vendedor[]); int _tmain(int argc, char* argv[]) { int vendedor[10]; ingresar_gente (); comparar_datos (vendedor); system ("PAUSE"); return 0; } void ingresar_gente () { int i = 0, legajo; float total_ventas; while (i < 10) { cout << " Ingrese un legajo: "; cin >> legajo; i++; while (legajo != 0) { cout << " Ingrese la cantidad de ventas hechas: "; cin >> total_ventas; } } } void comparar_datos (int vendedor[]) { float aux, total_ventas; int i, legajo; for (i = 1; i < 10; i++) { if (total_ventas >= aux) { aux = total_ventas; cout << legajo; } } }
and the errors are:
C++ Syntax (Toggle Plain Text)
--------------------Configuration: maximo_ventas - Win32 Debug-------------------- Compiling... maximo_ventas.cpp C:\Documents and Settings\pm11218\ejercicios c++\maximo_ventas\maximo_ventas.cpp(66) : warning C4700: local variable 'total_ventas' used without having been initialized C:\Documents and Settings\pm11218\ejercicios c++\maximo_ventas\maximo_ventas.cpp(69) : warning C4700: local variable 'legajo' used without having been initialized Linking... LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main Debug/maximo_ventas.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. maximo_ventas.exe - 2 error(s), 2 warning(s)
and yes, im usin visual c++ 6.0
now, tinkin.. the version has somethin to do with this or is somethin else?
•
•
Join Date: Nov 2007
Posts: 978
Reputation:
Solved Threads: 208
•
•
•
•
and the errors are:C++ Syntax (Toggle Plain Text)
int _tmain(int argc, char* argv[])
C++ Syntax (Toggle Plain Text)
Linking... LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
#include <tchar.h> •
•
Join Date: Jul 2008
Posts: 60
Reputation:
Solved Threads: 0
the code is:
C++ Syntax (Toggle Plain Text)
// maximo_ventas.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> #include <vector> using namespace std; void ingresar_gente (); void comparar_datos (int vendedor[]); int _tmain(int argc, char* argv[]) { int vendedor[10]; ingresar_gente (); comparar_datos (vendedor); system ("PAUSE"); return 0; } void ingresar_gente () { int i = 0, legajo; float total_ventas; while (i < 10) { cout << " Ingrese un legajo: "; cin >> legajo; i++; while (legajo != 0) { cout << " Ingrese la cantidad de ventas hechas: "; cin >> total_ventas; } } } void comparar_datos (int vendedor[]) { float aux, total_ventas; int i, legajo; for (i = 1; i < 10; i++) { if (total_ventas >= aux) { aux = total_ventas; cout << legajo; } } }
![]() |
Similar Threads
- Struct Problem (C)
- Beginer struct problem! (C)
- Accessing To A Struct With A Given Pointer (C)
- Derived class problem (C)
- problem with my program!! (C++)
- struct error (!?) (C)
- struct type redefinition (C++)
- ** Need Help ** in a small C++ problem (C++)
Other Threads in the C++ Forum
- Previous Thread: Heap Corruption??!! Help!!!
- Next Thread: socket programming
| Thread Tools | Search this Thread |
api array arrays based beginner binary bitmap c++ c/c++ calculator char class classes code compile compiler console conversion count delete deploy desktop directshow dll download dynamic dynamiccharacterarray encryption error file forms fstream function functions game getline givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory news node output parameter pointer problem program programming project proxy python read recursion recursive reference return rpg string strings struct temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






