I have an assumption and I don't know is this true or not:
If i use int arr[5];
the "hello"will store some where in the memory and the adress ofthat will store in the arr[0].Code:arr[0]="hello";
and I think when i have a function like this
Code:void my_func(const char *string,...)
and I pass a string(array)to that function then it will store it some where in the memmory and the address of that will store in the stack but when I pass an integer type like 'j' to a function likethe j will store in the in stack directly not the address of it. is my assumption true?Code:void test(char s){}
now I want to call that functionand I want to point the next argument so I do it like this:Code:my_func("hi how",45,'c');
but argptr points to the where "hi how" stored not to the stack (as my assumtion and I don't know if it's true or not)Code:void my_func(constchar*string,...) { void*argptr = format; argptr =((int*)argptr +1); }
how can I do that?