[Dev-C++] dynamic allocation of a class member
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: <jp...@bo...> - 2002-11-23 02:28:38
|
Sorry for the last html e-mail...=20
Can I allocate memory for a member of a class dynamically? For
example:
class test{
public:
int *p;
test(int size);
}
test::test(int size){p =3D new int[50];}
Is it illegal?
Juliano
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...] On Behalf Of P.D. van
Zelst
Sent: sexta-feira, 22 de novembro de 2002 21:17
To: dev...@li...
Subject: [Dev-C++] Linux 'socket' calls...
Venha para a VilaBOL!=20
O melhor lugar para voc=EA construir seu site. F=E1cil e gr=E1tis!
http://vila.bol.com.br=20
Hi,
I'm trying to write a program which should be able to compile on Linux
using gcc (actually, g++, but still), as well as under Dev-C++ (that's
my goal). It appears mingw (I suppose?) doesn't implement 'socket()' or
any of these functions, and the only way I can develop my program at the
moment, is by writing my code in Dev-C++, then using cygwin to compile
it, and then in a command window execute the program to see if it all
works well... seems to me like this could be done simpler.... for
example, by hitting 'Compile' from within Dev-C++ :P
I hope it's somehow possible to perform these socket calls and be able
to compile the code from within the IDE (I think the ones that are
giving the most trouble are "fnctl", "ioctl", "socket", "write" etc).
Why oh why did I have to make this project cross-platform :|
Anyway, I hope anyone can help me with this... or if someone could tell
me "it can't be done" or anything.
Thanks in advance,
Paul
|