|
Hope I understood your question
if you want to delete comma of you can use CString::Find for get commas and then remove their of your string with CString::Delete.
|
|
|
|
|
WhiteSky wrote: Hope I understood your question
I think he is asking how to parse a file that contains comma and want to ignore them when parsing.
|
|
|
|
|
I want it in C programming
|
|
|
|
|
WhiteSky wrote: if you want to delete comma of you can use CString::Find...
This is a C question, not C++/MFC.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
thathvamsi wrote:
I want it in C programming
you have to implement logic for same!
"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
Support CRY- Child Relief and You
|
|
|
|
|
thathvamsi wrote: eg., 1, Steve,Dave, 25yrs, California
If the string to be parsed is "1, Steve,Dave, 25yrs, California", there's no way to reliably differentiate between the various commas. Depending on the placement of a space is unreliable.
Now, if you have control over how the aforementioned string is put together, then a solution is very easy.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I created a edit box and a "apply" button. when i clicked button, I want it can retrieve the value which i typed in the edit box.following is my code, but why it doesnt work?
void CIPConfig::OnBnClickedButton2() // enable
{
UpdateData(FALSE);
int level;
level = atoi(v_level);//v_level is varibale of edit box.
}
|
|
|
|
|
if you want to read of editbox you can use GetWindowText or GetDlgItemInt or GetDlgItemText
|
|
|
|
|
yijia_24 wrote: UpdateData(FALSE);
use
UpdateData( TRUE );
yijia_24 wrote: int level;
level = atoi(v_level);//v_level is varibale of edit box.
u can directly create a int varaiable for the edit control. no need of this..
nave
|
|
|
|
|
yijia_24 wrote: level = atoi(v_level);//v_level is varibale of edit box.
why using atoi function.. you can use DDX_Text directly for integer value
"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
Support CRY- Child Relief and You
|
|
|
|
|
Thank you very much!
Would you explain to me the difference between UpdateData(FALSE) and UpdateData(TRUE)? I am still very confused about it.
|
|
|
|
|
Thank you very much!
now i need send this data to a socket, do u know how to do it?
Thank you,
yj
|
|
|
|
|
yijia_24 wrote: UpdateData(TRUE)?
when u call the UpdateData(TRUE), the values in the control are set to the value variable created for each control.
When u call the UpdateData(FALSE), the values in the variable is set to the correspoding control.
When u call a UpdateData function, it sets/gets all the value to and from all the controls to the variables. some times u may want to take only the text of one edit control. But in that case also all controls in the dialog are upadated. It slows down the program.
U can use the GetDlgItemText() or SetDlgItemText instead of UpdateData()( I recommend this )
nave
|
|
|
|
|
Thank you very much!
I appreciate you spending time over my questiones.
|
|
|
|
|
yijia_24 wrote: Would you explain to me the difference between UpdateData(FALSE) and UpdateData(TRUE)?
Here is a good article on UpdateData Avoiding UpdateData [^]
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|
|
yijia_24 wrote: I am still very confused about it.
Which is why you should avoid it. See here for more.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Naveen R wrote: yijia_24 wrote:
UpdateData(FALSE);
use
UpdateData( TRUE );
Another reason why UpdateData() should be avoided.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Not sure where to post this, so I hope the admin will bump it somewhere more appropriate (not /dev/null!)
I am looking at Vista RC1, and am curious about the geomentry shaders in DirectX.
Does anyone know about these?
Is there any/much sample code about?
Thx
Hugh
|
|
|
|
|
me wrote: I am looking at Vista RC1, and am curious about the geomentry shaders in DirectX.
The latest DirectX SDK has DX 10 sample code which works only on Vista, so if you have Vista developer preview, you can download the latest SDK and see for yourself.
|
|
|
|
|
Yes, I've had a quick flick through those, but was wondering if there were any other samples 'out in the wild'. It looks like a really powerful tools, and I am also interested in how people are looking to use it.
(I just thought - I should review the license and check we're allowed to post sample code at this early stage!)
H
|
|
|
|
|
me wrote: but was wondering if there were any other samples 'out in the wild'.
Not sure about that, have you seen Crysis tect demo? They use DX 10 technology, but I haven't seen it running on the actual computer, just videos.
|
|
|
|
|
Does FAR have a defined menaing in VC++? I'm trying to work through some code and am puzzled by this usage.
typedef OrderTypeStr FAR *OrderTypePtr;
Thanks
|
|
|
|
|
|
You can ignore "far", it hasn't been relevant since the 16-bit days.
|
|
|
|
|
...i can't find any :P.
Is this concept implemented or do i really have to provide an exact location for every label/button/text box that i use?
|
|
|
|