Thread: [Dev-C++] Number of elements of a multidimensional array
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
From: Luc Saint-E. <lu...@sa...> - 2002-11-28 09:35:39
|
Hello, I know this is a basic question... How can I know the number of elements of a multidimensional array (char **result) ? Thanks in advance Luc |
From: <jp...@bo...> - 2002-11-28 11:26:30
|
So far as I know, it is not possible to do what you want. The programmer must control the size of this kind of array so he can manipulate it. If it wasn't a pointer you could achieve it by dividing the array by the size of one single element or something like this... Or if you stored Null terminated strings you could search for the '\0' character... Beyond this two cases, I don't know if it's possible, but if someone else know any way, I'd like to know it too. Juliano -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Luc Saint-Elie Sent: quinta-feira, 28 de novembro de 2002 06:35 To: dev...@li... Subject: [Dev-C++] Number of elements of a multidimensional array Venha para a VilaBOL! O melhor lugar para voc=EA construir seu site. F=E1cil e gr=E1tis! http://vila.bol.com.br Hello, I know this is a basic question... How can I know the number of elements of a multidimensional array (char=20 **result) ? Thanks in advance Luc ------------------------------------------------------- This SF.net email is sponsored by: Get the new Palm Tungsten T=20 handheld. Power & Color in a compact size!=20 http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
From: <h.r...@gm...> - 2002-12-01 21:31:37
|
Hi List, I know, it's bad style to ask the same question twice, but the problem still remains. If i compile a program i get the error message: Compiler: Default compiler Building Makefile: "E:\dev\dev-c++\proj2\Makefile.win" Führt make... aus make.exe -f "E:\dev\dev-c++\proj2\Makefile.win" all g++.exe ../proj2/main1.o ../proj2/procabi.o ../proj2/readdata.o ../proj2/writedata.o ../proj2/intro.o ../proj2/datei.o ../proj2/inout.o -o "testproj1.exe" -L"C:/Dev-Cpp/lib" -L"E:/dev/dev-c++/proj2" -I"C:/Dev-Cpp/include" -I"C:/Dev-Cpp/include" -I"C:/Dev-Cpp/include/c++/3.2" -I"E:/dev/dev-c++/proj2" -mcpu=pentium -fexceptions -s C:\Dev-Cpp\bin\..\lib\gcc-lib\mingw32\3.2\..\..\..\..\mingw32\bin\ld.exe: cannot find -lstdc++ make.exe: *** [testproj1.exe] Error 1 Ausführung beendet It would be great if anyone has a hint about it. Many Thanks Horst -- -- Horst Rößner ICQ ID #74808448 h.r...@gm... h.g...@t-... www.hroess.net +++ GMX - Mail, Messaging & more http://www.gmx.net +++ NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen! |
From: <jp...@bo...> - 2002-11-28 11:47:29
|
So far as I know, it is not possible to do what you want. The programmer must control the size of this kind of array so he can manipulate it. If it wasn't a pointer you could achieve it by dividing the array by the size of one single element or something like this... Or if you stored Null terminated strings you could search for the '\0' character... Beyond this two cases, I don't know if it's possible, but if someone else know any way, I'd like to know it too. Juliano -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Luc Saint-Elie Sent: quinta-feira, 28 de novembro de 2002 06:35 To: dev...@li... Subject: [Dev-C++] Number of elements of a multidimensional array Venha para a VilaBOL! O melhor lugar para voc=EA construir seu site. F=E1cil e gr=E1tis! http://vila.bol.com.br Hello, I know this is a basic question... How can I know the number of elements of a multidimensional array (char=20 **result) ? Thanks in advance Luc ------------------------------------------------------- This SF.net email is sponsored by: Get the new Palm Tungsten T=20 handheld. Power & Color in a compact size!=20 http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
From: Ioannis V. <no...@ho...> - 2002-11-28 13:43:48
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of Luc Saint-Elie > Sent: Thursday, November 28, 2002 11:35 AM > To: dev...@li... > Subject: [Dev-C++] Number of elements of a multidimensional array > > > Hello, > > I know this is a basic question... > How can I know the number of elements of a multidimensional > array (char > **result) ? > > Thanks in advance > > Luc If you are programming in C++, use std::vector instead. If you are programming in C you have to store it in a separate variable and transfer the value to every function call. Ioannis Vranos * Programming pages: http://www.noicys.freeurl.com * Alternative URL: http://run.to/noicys |