c and c++ programming difference-VI
March 4, 2007 12:30am CST
c and c++ programming difference-VI: Implicit Assignment from void*: You cannot implicitly assign from a void* to any other type. For instance, the following is perfectly valid in C (in fact, it's arguably the preferable way of doing it in C) int *x = malloc(sizeof(int) * 10); but it won't compile in C++.
1 May 07
instead of this we can say IN C++ WE HAVE ANOTHER BETTER METHOD FOR DYNAMIC MEMORY ALLOCATION.... in c++ a keword new is give which is not there in c.... instead of making variable (or araay) at run time we can use the following statement ;;;;;; int *p; p= new int; any way nice to meet you ....