|
Just do it like you do it with any other file - fopen(), fread(), fwrite(), fclose(). If that's vanilla C++ you want of course.
--------------------------------
Human stupidity is infinite.
|
|
|
|
|
Hello
I suggest you considder to use a SAX parser. SAX has less memory (and CPU) overhead than DOM.
If you use MSXML, there are plenty of samples at MSDN.
Kakan
|
|
|
|
|
Alex Orovetskiy wrote: If that's vanilla C++ you want of course.
Actually, no. You're telling him to do it in C. I would hope that most people using C++ would never use these functions.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Yeah, right. What's so bad about them anyway apart from being clumsy ?
--------------------------------
Human stupidity is infinite.
|
|
|
|
|
That's about it, it's clumsy, it's ugly and C++ provides a good alternative that is rich in functionality that C file handles cannot offer.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
srimayank11_codeproject wrote: The next task is to dynamically update the XML file once the user select the file to be deleted by clicking on the Application UI.
What about this wrapper class :-
http://www.codeproject.com/soap/markupclass.asp[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Could anybody point me to a basic source of information on using struct in functions - passing as parameters and returning from functions.
I am confused regarding the difference in C an C++ syntax.
I am looking for using arrays of struct.
Thanks for your time
Vaclav
|
|
|
|
|
Passing arrays is the hard bit, a struct is just like a class, you can pass it in and you can pass it out. If I wanted to return an array of items, I'd probably take a std::vector by reference, and add them to that.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Structs are typically passed by pointer. In the case of struct arrays, it really depends on how you allocate the array. By incrementing a struct pointer, you actually increment the pointer to point to the next struct (the compiler increments it by the sizeof() the struct).
EX:
typedef struct _MyStruct
{
int iValue;
char caData[21];
} MyStruct;
MyStruct *StructFcn(MyStruct *spStruct, int iCount);
void PassStructToFcn()
{
MyStruct *spRetval = NULL;
MyStruct sStruct;
sStruct.iValue = 7;
strcpy(sStruct.caData,"Hello");
spRetval = StructFcn(&sStruct,1);
}
void PassStructArrayToFcn()
{
MyStruct *spRetval = NULL;
MyStruct sStruct[3];
sStruct[0].iValue = 2;
strcpy(sStruct[0].caData,"Hello");
sStruct[1].iValue = 3;
strcpy(sStruct[1].caData,"Hello");
sStruct[2].iValue = 7;
strcpy(sStruct[2].caData,"Hello");
spRetval = StructFcn(&sStruct[0],3);
}
MyStruct *StructFcn(MyStruct *spStruct, int iCount)
{
for (int iLup = 0; iLup < iCount)
{
if (spStruct->iValue == 7)
return spStruct;
spStruct++;
}
return NULL;
}
onwards and upwards...
-- modified at 12:58 Monday 12th December, 2005
|
|
|
|
|
I want to develop a firewall software with C++ Builder.But i don't know how can i start.Must i use a driver or anything else (Ndis,filter hook ....)Please tell me how can i start? What i need ?
what is ndis and winpkfilter?
|
|
|
|
|
wilusili wrote: what is ndis and winpkfilter?
what is google ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
i have only asked ....go to hell with your f***ing codes...
|
|
|
|
|
Yep - that's the way to get help. Start by being incapable of searching for anything yourself. Then ask incredibly broad questions, post them on several forums, sit back and wait. When people suggest you do a little work for yourself, be really abusive about it.
Good luck.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Yep - that's the way to get help. Start by being incapable of searching for anything yourself. Then ask incredibly broad questions, post them on several forums, sit back and wait. When people suggest you do a little work for yourself, be really abusive about it.
Good luck.
|
|
|
|
|
lafifa wrote: Yep - that's the way to get help. Start by being incapable of searching for anything yourself. Then ask incredibly broad questions, post them on several forums, sit back and wait. When people suggest you do a little work for yourself, be really abusive about it.
Is My eyes goes Blurred.. I Am seeing two similar posts
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
this kind of messages you can really expect from people who have hardly posted 3 messages. i really feel sorry for it.
"But your mind is very complex, very tricky. It makes simple things complicated. -- that's its work. And for centuries it has been trained for only one thing: to make things so complicated that your life becomes impossible."- Osho
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1"> --[V]--
|
|
|
|
|
"But your mind is very complex, very tricky. It makes simple things complicated. -- that's its work. And for centuries it has been trained for only one thing: to make things so complicated that your life becomes impossible."- Osho
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1"> --[V]--
|
|
|
|
|
wilusili wrote: go to hell with your f***ing codes...
Calm Down Buddy... no use of using this silly language here!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hi!
There is a new type of driver since Win2k and WinXp, which was created my microsoft for something like firewalls and so on (I think they are called filter driver or something).
NDIS is an interface specification for network cards. If you need more information: http://www.ndis.com/[^]
Marcel Erz
|
|
|
|
|
hi ,
i made an application that receive data from a system and multicast it , but i want to make it server , so anyone can tell me how to do this ,
i used just create and connect function of socket , what other things need to do ,
regards,
sachin gupta
|
|
|
|
|
|
Hi all,
How can I achieve antialiasing for bitmap edges programatically as the Windows XP do for icons...
Any suggestions or links are welcomed.
Thank you.
- NS -
|
|
|
|
|
what are you hoping to do here - to merge the edges with the background ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
|
If you want a gradual gradient, I'm not sure that there's any way of doing this without writing your own filter code. You can specify the transparency of an image when you draw it, you could draw it in sections to create this effect. A filter seems like overkill, but I'm not aware of a way to do it so you draw the image, and the transparency is applied by itself.
Christian Graus - Microsoft MVP - C++
|
|
|
|