Hi,
Using void* and sizeof is it possible to get the value of the object ?
I understand that dereferencing a void pointer is not directly possible. Is there a way (like casting) or something else to get the value of the object.
The problem is I wouldn't know the type of the object to cast to, I would only know the size of the object and a void pointer to the object.
something similar to what qsort does in stdlib.h, using merely the void pointer and sizeof, I think it manages to access the object, otherwise wouldn't be able to sort it.
Below shown is an example in which inside the function f1, I am suppose to access the object.
Code: class ClassA{};//Inside f1, I have to access the value of the object that pPtr1 points tovoid f1(void* pPtr1, const int pSizeOfObj){}int main(){ ClassA objA; f1(&objA, sizeof(objA)); return(0);}Thanks,
SCO Unix
I know this might not be the place to ask, but, can anyone tell me if SCO Unix comes with PHP built in???
array_combine() trouble w/csv file
I have a problem with a piece of code I wrote to import some records from a csv file into mysql. I have a .csv file with about 300 records in it. The code worked perfect while testing on 3 or 4
form help
this doesn't work. i want the form action to go the location.href of the submit button chosen.. how do i do this?Code: <?php echo "<form enctype='multipart/form-data'
How to make URL loads only on login
On my page, when a user login he's redirects to user_home.php. I made it also to open the chat screen when the user login.This is the code:Code: // USER IS LOGGED IN, FORWARD TO USER HOMEif(
retrieving more than one max key from an array?
so i have an array of 20 numerical values (0-100) that i need to order from highest to lowest and then i need to retrieve the keys of the top ten values. $array1 =
CODE NOT WORKING
Code: [Select]<?php//include shared codesinclude '../lib/common.php';include '../lib/db.php';include '../lib/function.php';include '../lib/User.php';//construct password request for
What's best way to get a user's Word doc converted to simple html and images?
Hi all,I was just wondering if anybody has any experience of this.Basically, I'm building a site for a guy and he keeps throwing tonnes of content my way, all Word docs with tables, images, etc.The
Reading Most Recent CSV File in Directory
I thought I had wrapped this project up, but found out that the program I use to FTP a csv file to my website is best used in time stamp mode. That is, each day a newly named csv file is uploaded with
Place specific image in html page when specific name is typed.
Hello,Fairly new to PHP and was curious if someone might know how to solve a fairly simple request.I am currently passing the name of an end user (who types their name in a form field) to a URL which
Problem with HTML form
Hello,I made a HTML form with some fields and check box.Everything works fine except when i receive the email, only fields appear in the email not the content of the check box.I have attached the