0

txtULCol->Text == "" does not work for checking for a blank textbox in VC++ .NET. With or without text the code always return false. Any suggestions? Thanks.

2
Contributors
1
Reply
2
Views
12 Years
Discussion Span
Last Post by alpha_foobar
0

this would never work in c++. in .net it is possible that pointer is to a string class that has an equals method like txtULCol->Text.equals(""). thats how i'd do it in c# anyhow.

in normal c++ i'd do a strcmp(txtULCol->Text, "") == 0 or !strcmp(txtULCol->Text, "") ... but i mainly use C.

however... why not check the length? strlen(txtULCol->Text) == 0 or txtULCol->Text.Length == 0.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.