tayyabatiq

Hi
I'm coding in C++ XAML to make a windows 8 store app.

Now, there are two objects in my main window: a textBox and a textBlock.
What i want to do is that the user will write an equation in the textBox and the textBlock will show all the literals in that equation. The textBlock should keep updating as soon as the user changes the data, without the user pressing enter or clicking another button or something.

What i'm trying to do is, the Text in the textBlock will be equal to a string that the function "return_literals" returns. "return_literals" will take Text from the textBox as soon as the text is changed by the user and process it to return literals.

The problem is, i don't know how to pass or recieve data from a function in xaml. Please tell me how to accomplish this task.

Thanks in advance :)

tayyabatiq

Thankyou for your reply.

Nothing complicated. I thought, instead of writing: (!A && !B) || (B && C), i could just write (A'.B')+(B.C)

tayyabatiq

I'm making a class for boolean expressions, a simpler version of bool.
I need three operators, one for AND, one for OR and one for NOT.
I can easily make + for OR, by overloading, but how can i declare . for AND and ' for NOT?
Can i even do this?
Thanks in advance
P.S, i'm a beginner :)

tayyabatiq

@deceptikon: thankyou for your time

tayyabatiq

@NathanOliver: i've changed the font to Lucida Console. I hope that's the correct one.

@deceptikon: just trolling :P

tayyabatiq

I've tried your code but all it does is display question marks in the console!

tayyabatiq

Sorry i posted before i read your post :\

tayyabatiq

It doesn't work since pasting those symbols in Dev C++ only pastes question marks.

const wchar_t *white = L"♔♕♖♗♘♙\r\n";

const wchar_t *black = L"♚♛♜♝♞♟\r\n";

tayyabatiq

How can i use that function with an integer value?
cout<<L"9812"; and any other integer value displays: 0x401290

L''
L""

tayyabatiq

Thankyou for replying

Yes i've read that page before. But as i said before, i'm just a beginner. So i did not get a word that was written there. I'm very much confused right now.. Can you send me a sample code for doing this task? including the libraries..

tayyabatiq

I've been searching for days, and everyone keeps telling to change font to Lucida Console Unicode, use wide characters and output using wcout.
But the thing is:
1.How to change font to Lucida Console Unicode?

2.If i try to just copy/paste the character (like ♔) in Dev C++, there appears '?' instead of '♔'

3.There must be a function for UNICODE like char(x) is for ASCII

tayyabatiq

Hi,
I want to output chess symbols from unicode to console in c++, please tell me how to do that.
Im using Dev c++, windows8 and console.
Im just a beginner so please keep it simple for me (also tell me the libraries to include please)

tayyabatiq

I've also tried this:

switch(A){
                     case WM_KEYDOWN:
                          switch (wParam){ 
                                 case VK_LEFT: cout<<"LEFT";
                                 break;
                                 }
                     break;
                     }

but still says wParam not defined

tayyabatiq

How to define wParam? Please add the line in my program, i've been searching for its right use everywhere but couldnt find :(

tayyabatiq

This code is supposed to write everything the user writes, and keep writing until the user presses ALT key.

do{
        //declaration
        string A;
        getline(cin,A);
        ofstream file;
        ifstream file1;

        //file opening
        file.open("C:\\Dev-Cpp\\file.txt");
        file1.open("C:\\Dev-Cpp\\file.txt");

        //file input
        file<<A;
        file.close();
        file1.getline(B,1000);
        file1.close();

        //file output
        cout<<B;

    } while (wParam!=VK_MENU);

The problem is, it says: wParam undeclared!
I want to keep checking the last key pressed, without disturbing the input. Anyone got any solution?