using namespace std;
int _tmain(int argc, _TCHAR* argv)
but i cannot understand how it work.
No, he's not. He's creating an array of arrays of pointers.
and trying to output the size, this is not allowed sice the compiler does not know what the pointer is pointing to.
Yes, it's allowed and yes, the compiler knows perfectly well what p (or rather the pointer that p decays to) is pointing to: to a 20 element arrays of int pointers. So it returns sizeof(int*) * 20
And if he had created a pointer to an array (by writing int (*p) instead of int *p), it'd still be allowed and the compiler would still know what p points to: a 10x20 array of int. So in that case it would return sizeof(int) * 200.
I'm sorry, I do not understand your reply. I said that "in that case it [i.e. sizeof(*p)] would return sizeof(int) * 200". So yes, that's the same as sizeof(*p) (if p had been defined as a pointer to an array) - that's what I was saying.
I am writing a java program that needs to execute shell commands, so I wrote a function that would take the command to execute as a string (ie: "mkdir ~/Folder1") and execute that command with the shell. Here is the function:
Runtime run = Runtime.getRuntime();
Process pr = ...
Hi. I have a form with list box : lst_product, datagridview : grd_order and button: btn_addline. lst_product has a list of product ids selected from database (MS Acess 2013) , grd_order is by default empty except for 2 headers and btn_addline adds rows to grd_order.
Hey, so I wanna ask how I need to create a method who will remove word if in that word is 2 same chars. Example: "Potato" in this word there is a 2 "o" chars so this word will need to be removed. "Forum" in this word there is no ...