|
can you please show us how is declared SomeFunction(), and what you're trying to do exactly...
just a guess: why aren't you using std::vector<> ?
-- modified at 4:39 Wednesday 2nd May, 2007
[edit]
what about overloading SomeFunction() into Somefunction(const std::vector<std::string>&) and use this code instead :
std::vector<std::string> vec;
vec.push_back("mon");
vec.push_back("tue");
vec.push_back("wed");
SomeFunction(vec);
[/edit]
|
|
|
|
|
This function is from a lib. here is the declaration in the header file
(Somefunction=StringArray)
<br />
class StringArray<br />
{<br />
public :<br />
int len;<br />
const char * const *data;<br />
StringArray() : len(0), data(0) {}<br />
StringArray(const char * const *data, int len) : len(len), data(data) {}<br />
const char *operator[](int i) const { return data[i]; }<br />
};
|
|
|
|
|
Joe Smith IX wrote: StringArray(const char * const * data, int len)
oh my god !!! does this really compile, and even if so, is this really necessary, rather that const char* ??
and is this class yours ?
why using C style stuff in a C++ code ? (i mean, char* strings when you obviously use classes, so, could use std::string ...)
|
|
|
|
|
like i wrote before, it's not my class. it's part of a lib i am using.
and i am bit confused myself (since I always use the easier path - MFC
so, is there anyway to get around this?
|
|
|
|
|
i have to parse an xml file using basic c program. i had seen in vc++ and also in c#. but how to do this in c programming. pls help me
|
|
|
|
|
Write your own parser. Use string functions like strcpy,strcmp etc.
Or find some third party libs.
If u can Dream... U can do it
|
|
|
|
|
hmm yes but i dont have any idea in that. how to parse the tag
<cardname>kumaran</cardname>
<cardtype>DISCOVER</cardtype>
<cardno>6011766587484374</cardno>
<cvv>232</cvv>
<EXPDATE>05/2015</EXPDATE>
pls help me
|
|
|
|
|
Basically C processing is identical to C++ one. Of course if you use DOM, then you have to take into account how to access COM objectd from plain C (there are good articles about, see, for instance [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
I need to open "*.tar" folder that was created on unix server then using FTP transfered to local (Windows) PC!
THX!
|
|
|
|
|
|
I need the code if any one did this. I used 'DecompresLibrary' article but didn't help. I posted question there but got no replay from author.
|
|
|
|
|
thats not really a programming question as you've phrased it, so you could be flamed for posting it here .. but since Im in a good mood ....
you could do that with WinZip, or 7-Zip (free) http://sourceforge.net/projects/sevenzip/[^]
There are freebie toold with source around that will let you do this, if you want to do it programatically
'g'
|
|
|
|
|
may be u can use winzip or winrar and pass the file as command line. You can
do it with shellexecute function or createprocess..
If u can Dream... U can do it
|
|
|
|
|
|
Then you obviously need to buy or find a tar library, I doubt you'd want to be writing one.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Your application is a windows application right ? or dos?
anyway there are apis for starting an application from your application. if it is dos there are functions like system(<command>) , in windows there are functions like winexec, createprocess,shellexecute.
So call the decompressing utitiles like winrar or winzip from ur app.
Also u can find the registread application for a file from registry (may some api are there). In that u can invoke that apps.
[IF you have winrar installed there is an exe named unrar , check it out . ]
If u can Dream... U can do it
|
|
|
|
|
and maybe you could speak english well as well ;P
|
|
|
|
|
???
I'm sorry if i am making any trouble to someone, I apology to them.
|
|
|
|
|
i was saying that to krishnadevank.
but for your part, you should try to understand the answers you got instead of asking someone to write a full for you because none will. we're not paid to deliver working code, but to help others to succeed in there goals.
search the msdn for ShellExecute(), and search Winzip documentation for using it by command line...
|
|
|
|
|
Again i'm sorry!
It was never my intention to expect from anyone to write a code for me, i was only looking for help from those who encounter with this before and maybe let me know how they solved this!
Thanks to all!
|
|
|
|
|
josip cagalj wrote: I need to open "*.tar" folder...
Is there anything special about this folder, or does it just happen to have a .tar extension? If not, there's really no need to open it. Just establish the FTP connection, and transfer the file(s) in that folder like you would any other.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hi
I want to get an outside border in a Rich Edit Control using PARAFORMAT2 structure with PFM_BORDER set at the click of a button. The code is written as:
OnBorder()
{
CRichEditCtrl& RCtrl=GetRichEditCtrl();
PARAFORMAT2 PF;
ZeroMemory(&PF,sizeof(PF));
::SendMessage(RCtrl.m_hWnd, EM_GETPARAFORMAT, 0, (LPARAM) &PF);
PF.dwMask=PFM_BORDER;
PF.wBorderSpace=2000;
PF.wBorderWidth=5000;
PF.wBorders=32|0|0;
PF.cbSize=sizeof(PF);
::SendMessage(RCtrl.m_hWnd, EM_SETPARAFORMAT, 0, (LPARAM)&PF);
}
But I dont get the border.
Please Suggest.
Barna
-- modified at 4:38 Wednesday 2nd May, 2007
Barna
|
|
|
|
|
I haven't tried this, but what happens if you specify a border style instead of "none";
// Outside borders, 3/4 point style
PF.wBorders=32|(1<<8)|0;
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Thanks for your response. Tried with your solution. But the problem still remais. The border does not appear.
Thanks
Barna
Barna
|
|
|
|
|
I tested this a bit.
Seems the RichEdit control (2.0+) supports the paragraph borders but doesn't/can't display them.
If you copy text from your control into Word, you'll see the borders.
That's as much as I know at this point
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|