|
Yeah I tried to use the NULL terminating char "\n" and "\r\n" and 0. None of this works. I need to get the remainder of the File contents by excluding the first line.
|
|
|
|
|
show off a piece of your code...
|
|
|
|
|
Sitaram Sukumar wrote: After I have read the complete txt file (using Read), I need to read it one line by one line.
Why are you reading the file twice?
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
hai all,
Does Anyone know how to compare two dates, and if one date is greater than other date can we find out number of days between them.
Is there any function or class that can do it automatically.
Pleas help me
Thanks in Advance
George K Jolly
|
|
|
|
|
|
Assuming you're using the COleDateTime in MFC you can subtract the 2 dates, which will return a COleDateTimeSpan object. Then you can use the GetDays function to see how many days the 2 dates span.
Like this:
COleDateTime date1(2006, 8, 28, 0, 0, 0);<br />
COleDateTime date2(2006, 8, 30, 0, 0, 0);<br />
<br />
COleDateTimeSpan span = date2 - date1;<br />
int numDays = span.GetDays();
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
|
Hi all,
I have a cab file.I need to add digital sign to it.
i followed the following steps( as mentioned in http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q247257[^]
but if i write signcode in commmand prompt ,i got an error like Signcode is not recognized as an internal command.Wat is the problem..
plz tell me how to assign digital sign to Cab file..
Thanks in Advance,
Sunita
|
|
|
|
|
signcode is part of the SDK and must be in your path for this to work. If using Visual Studio .NET 2003, run 'Visual Studio .NET 2003 Command Prompt' from Start, All Programs, Microsoft Visual Studio .NET 2003, Visual Studio .NET Tools.
If using VS 2005, the signcode tool has been replaced with the signtool program. Use Visual Studio 2005 Command Prompt to run this.
signtool is also part of the standalone Platform SDK.
|
|
|
|
|
Thanks for ur reply..
i have tried this signtool in vs2005..
A signtool signwizrd window opened.I refered my Cab file using browse..but its simply opening the folder of CAB(where i have set of DLLS) not refering any files.
PLz tell me wat is the problem in it..
Thanks in advance,
Sunita
|
|
|
|
|
The default filter of that Browse dialog is EXE, DLL and OCX files. Select 'Cabinet Files (*.cab)' from the 'Files of type' drop-down to pick your cab file.
Alternatively use signtool sign to specify the options on the command line.
|
|
|
|
|
I was wondering if there was a way to extend already allocated memory similar to what realloc() does. I know the operator new can be initialized with existing memory, but I have yet to find a way to make that memory grow.
char *tmp = new char [10];
strcpy(tmp,"hello");
char *tmp2 = new(tmp) char [20];
strcpy(tmp2,"Another string");
delete [] tmp;
This of course throws an exception because it's writing past the end of the array. Is there a way to do this without allocating, copying then deleting?
|
|
|
|
|
pls overload new ....
so u can do as u like
|
|
|
|
|
why not using std::string ?
|
|
|
|
|
No particular reason, but I would like to keep the size of the exe down to a minimum. Besides I'm on a learning curve
|
|
|
|
|
basically, if you use C++ (and you do, as new operator is not a C operator), prefer C++ classes instead of the C-runtime. STL is a powerful library which is too much abandonned because of the fear of templates...
|
|
|
|
|
I totally agree with you. I am just the sort of person who can't settle for "If it works it works", I need to know how it works. When I understand exactly what the code is doing behind the scenes, I have feel I have more control over what I can do.
|
|
|
|
|
pls check the following http://www.research.att.com/~bs/bs_faq2.html#placement-delete
these may b euseful
RinuRaj
|
|
|
|
|
please, stop you SMS typing. use full words so that every one can understand you...
|
|
|
|
|
Thanks for that, I suppose overloading them is the only way to go, but I can't understand why an operator for this wasn't created along with new and delete.
|
|
|
|
|
waldermort wrote: I suppose overloading them is the only way to go
nope. new serves for allocating a new object, not reallocating an already existing one...
|
|
|
|
|
plz kindly help me in my project
#sanroop#
|
|
|
|
|
Why don't you have a try first and show us what you did? Then we would be able to better help you.
|
|
|
|
|
I guess its a general question
|
|
|
|
|
See here[^] is this your answer?
|
|
|
|