PDCurses TUI C++ Win32 console app - Access violation reading location -


I downloaded the source and was able to successfully include curses.h in my project, pre-compiled library and all good .

After a few hours of trying the library, I saw tuidemo.c in the demo folder, compiled it into executable and spectacular! What exactly do I want for my project

The problem now is that it is a C code, and I have a V. I am working on the C ++ project in C ++ 2008.

My files are required tui.c and tui.h ​​How can I include that C file in my C ++ code? I saw

but the compiler was not very happy with 100 warnings and errors.

I can go to include that TUI pdcurses / included /!

Edit

Edit:

I added extern "C" statement, so my test looks like this now, but I get some other type of error

  #include & lt; Stdio.h & gt; # Include & lt; Stdlib.h & gt; using namespace std; Extern "C" {#include & lt; Tui.h & gt; } Zero sub0 () {// nothing}}}} {{nothing} "Go inside the sub-menu first"}, {"Bsub", sub1, "Go inside the second sub-menu"}, {"", (FUNC) 0, ""} / * Always add it as the last item! * /}; Startmenu (Main Menu, "TUI - 'Text User Interface' Display Program); Return 0;}  

Although it is compiling successfully, it is throwing an error at runtime, which is a Bad Pointer suggests:

  0xC0000005: Access violation space 0x021c52f9  

on line

  Start menu (Menmanu, "TUI - 'Text User Interface' display program);  

Not sure where to go from here again thanks.

If I'm not mistaken (and I can be easily), it's C / C ++ Try to make a difference in calling the conference callback extern "C", and call them the C ++ function. It is called a trumpoline :)


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -