|
Sorry..i used m_tagid=strtok(string,delimit);
after this sentence my string is only tagid i loosing member is,name,date and balance so tell me how shall i use.
Sorry once again.
thanks and regards,
savitri.
|
|
|
|
|
Did you read the link[^] I gave you? There's a simple example there illustrating strtok .
--
gleat
http://blogorama.nerdworks.in[ ^]
-- Number Two's eyes narrowed and became what are known in the Shouting and Killing People trade as cold slits, the idea presumably being to give your opponent the impression that you have lost your glasses or are having difficulty keeping awake. Why this is frightening is an, as yet, unresolved problem. -- HHGTG
|
|
|
|
|
ya i read..and one more proble is that i want to add delimeter as '|'.but the problem is when i am adding ss1[k]='|';for first time it is adding but for next time it is not adding at all.it means after tag id it is adding but after memid ,name,date and balance it is not adding ..why is it so.
i am doing like this:
memid=dstr;
i am coping memid into ss1.
after this ss1[k]='|';
but it is working..
please tell me how shall i add delimeter. PLEASE HELP ME...
THANKS AND REGARDS,
savitri.
|
|
|
|
|
I am not sure what it is that you are after! Do you wish to split a string or concatenate a bunch of strings?
--
gleat
http://blogorama.nerdworks.in[ ^]
-- Number Two's eyes narrowed and became what are known in the Shouting and Killing People trade as cold slits, the idea presumably being to give your opponent the impression that you have lost your glasses or are having difficulty keeping awake. Why this is frightening is an, as yet, unresolved problem. -- HHGTG
|
|
|
|
|
hi gleat,
in ActiveX control i am doing concatination of strings so i want to add delimiter but i am not getting for all the strings.in my project i am using that concatinated string. in this i want split that whole string into diiferene strings.to split we want one delimeter know. so i am asking how to add delimeter..
Reply me..
thanks,
savitri
|
|
|
|
|
savitri wrote: ...i want to add delimeter as '|'.
According to this, your string is already delimited as such.
Since you are using MFC, take a look at AfxExtractSubString() . Also, the STL likely has something to do this with, but I'm going to leave that as an exercise for you.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
It all depends on how you concatenated the string. CString has 2 methods you'll probably want to use:
Mid() -- fetches a substring
Tokenize() -- breaks the string into parts given a delimiter.
It looks like you're using the comma delimiter, so use Tokenize.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<a href="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</a>
|
|
|
|
|
hi peter,
i am doing splitting the whole string into different strings. by using mid function but the problem is with tokensize.please tell me how can i splitt.i am doing like this:
m_cBalance=strResult.Mid(30,4);
m_eDate=strResult.Mid(20,10);
it is working properly but when write different data the size differs that time i have to again manipulate the mid function so can u help me to do automatically take the size of each string.
PLEASE HELP ME OUT.REPLY ME SOON.
THANKS AND REGARDS,
savitri
|
|
|
|
|
Hi All,
I am using VS 2005, i am getting following errors while building the
application.
1. error C4430: missing type specifier - int assumed. Note: C++ does not
support default-int
2. warning C4183: 'Open': missing return type; assumed to be a member
function returning 'int'
// the code written is as follows
/*public:
static BOOL Init();
Open(LPCTSTR pFilename); // open an AVI file
Close(); // close AVI File
Play(DWORD dwFlags, int nFirst = 0, int nLast = -1,
int nRepeatDelay = 0);*/
Please Help
Thanks in advance....
Suhi
|
|
|
|
|
It's standard procedure to define the return values for a function.
Your:
Open(LPCTSTR pFilename); // open an AVI file
could/should be:
int Open(LPCTSTR pFilename);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<a href="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</a>
|
|
|
|
|
Thanks Peter,
But i am getting still the following errors for my code :
1. error C4430: missing type specifier - int assumed. Note: C++ does not
support default-int
2. warning C4183: 'Close': missing return type; assumed to be a member
function returning 'int'
public:
static BOOL Init();
int Open(LPCTSTR pFilename); // open an AVI file
Close(); [i am getting error no 1. at this // close AVI file
line]
int Play(DWORD dwFlags, int nFirst = 0, int nLast = -1, int nRepeatDelay = 0);
Please help for this as i am really new to this type of errors.
thnx in advance
rgds
Suhi
|
|
|
|
|
uhh, well "Close" needs this too.
You've got to be new to C++.... not just this type of error.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<a href="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</a>
|
|
|
|
|
Thanks a lot Peter.
I hope u support me still i become perfect in C++ and VC++ concepts.
If you dnt mind i have 1 more query for u.Please help.
When i build the program i got 1 more error as follow.
Though the file 'mrcext4d.lib' is available in project directory
i am facing this problem please help.
The code was written in previous version and now i am using Visual
Studio 2005. Is this the problem? If yes please give me the solution.
LINK : fatal error LNK1104: cannot open file 'mrcext4d.lib'
THNX
Suhi
|
|
|
|
|
suhi wrote: LINK : fatal error LNK1104: cannot open file 'mrcext4d.lib'
See here.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
suhi wrote: 1. error C4430: missing type specifier - int assumed. Note: C++ does not
support default-int
See here.
suhi wrote: 2. warning C4183: 'Open': missing return type; assumed to be a member
function returning 'int'
See here.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,
How can I start my application at System Restart and System Shutdown?
|
|
|
|
|
Why do you need to do this?
Anyway, you could have app A configured to start on boot and have it create a hidden window which hangs around waiting for WM_ENDSESSION [^] to arrive and then starts process B when "lParam" is zero for that message.
Be aware that starting a process during shutdown is typically tricky and may even be prevented by the OS. You could, alternatively do your stuff in the WM_ENDSESSION handler of process A itself.
--
gleat
http://blogorama.nerdworks.in[ ^]
-- Once we figured out that taking our shoes and socks off would double our counting ability the technical glitch was quickly rectified. -- Chris Maunder, from the CP newsletter
|
|
|
|
|
hi...
how to run our application in windows services?
can anyone help me?
thanks.
paulraj
|
|
|
|
|
|
I have to create windows services...
paulraj
|
|
|
|
|
|
A():names(2){}
What's that for? When using vector, you don't declare the size. It's a dynamic sizing array...
Anyhow, it would be helpful for you to explain what differences you see.
(And who the heck gave me a 1 vote?)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<a href="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</a>
|
|
|
|
|
There is a constructor that will create a vector with N elements. Apparently it doesn't "construct" each element in the traditional sense though.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Peter Weyzen wrote: When using vector, you don't declare the size.
Yes, you can. See here[^] (search for "vector(size_type n)".)
Steve
|
|
|
|
|