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.

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.