Skip to content

C / C++ / MFC

C, Visual C++ and MFC discussions

This category can be followed from the open social web via the handle c-c-mfc@forum.codeproject.com

111.5k Topics 465.7k Posts
  • linker error lnk2005

    c++ csharp visual-studio linux help
    9
    0 Votes
    9 Posts
    11 Views
    R
    ok i will read it :thumbsup::thumbsup::thumbsup: :)
  • tracking down linker errors

    question
    4
    0 Votes
    4 Posts
    14 Views
    C
    I`m not sure what details you are expecting. All I have in the build output window is a one line message: 1>Tutorial07.obj : error LNK2001: unresolved external symbol "void __cdecl CheckCollisions(class std::vector > *,int,class contim *,int)" I know an error of this type means that some parameters don`t match in the function definition, declaration and the place where the function is being used. I did a search for the function name within the code file, everything seems to be fine in the function header (return type, function name and parameters) everywhere. I need more details to know what exactly doesn`t match. void CheckCollisions(vector * GAllElements, int UnitCount, contim* OldNewTable,int frame); never mind I found the error, it was a parameter mismatch, you have to be extra careful with those.
  • Using nlohmann JSON to insert more data

    tutorial c++ python data-structures json
    2
    0 Votes
    2 Posts
    5 Views
    Mircea NeacsuM
    I haven't used nlohmann json in a while (because I've made my own - see mlib/json.h at master · neacsum/mlib · GitHub[^] However I think this should work: // do something with the retrieved values cityInfo\[i\]\["newval"\] = to\_string (i + 1); --EDIT-- I read your message again and realized you want to extend the cityInfo array. In this case you would simply write something like: cityInfo[4] = json::parse(R"({"t":"x", "l" : [0.0, 0.0, 0.0, 0.0] })"); Mircea
  • Question About CToolTipCtrl

    debugging json question
    8
    0 Votes
    8 Posts
    29 Views
    F
    THANK YOU
  • 0 Votes
    27 Posts
    62 Views
    C
    Yes, My Listbox was empty and I was't observed that it was a Listbox. Thank you, see you soon with new topics.
  • 0 Votes
    2 Posts
    6 Views
    L
    That is the format I use and it seems to work fine. However, I have noticed with some of the system functions that a double slash works as well.
  • macro function definition

    help tutorial question
    21
    0 Votes
    21 Posts
    0 Views
    C
    Although I am not initiated in programming, I felt it when I started to learn C++ and MFC despite C#, that C++ is more closer to the hardware components, to the heart of the machine, I felt that with C++ I can put my hands and get dirty, and so on that with WINAPI I can comunicate more closer with WINDOWS system, through the windows API functions, I felt that those are the right and honest stpes to get started in programming, I felt that these are the basics that I have to know to start an healty way of programming. But my goal is as you expressed yourself " to make myself an income" and for that appears that I have to learn more tools to be able to deliver a stand alone product. I don't know if my path is the good one but I keep pushing until I will succed. Thank you.
  • Remove white space - empty lines - in editor

    question
    12
    0 Votes
    12 Posts
    19 Views
    P
    Yeah, "working as expected".
  • Replace CString Format()

    c++ question
    2
    0 Votes
    2 Posts
    6 Views
    Mircea NeacsuM
    std::format is not directly compatible with sprintf formatting codes. From what I've seen there are different ways to go about this: - do sprintf to a temporary buffer and assign buffer to a std::string - switch to string streams (std::stringstream) and their "<<" operator - switch to std::format and their "{}" style formatting. None is automatic and about equally unpleasant. Mircea
  • 0 Votes
    7 Posts
    9 Views
    L
    I am making progress - one of the issues was I was getting multiple "readyRead" SIGNAls. Not sure why... Now I am getting only one per "start(...) " QProcess and my process stays open.
  • 0 Votes
    16 Posts
    20 Views
    L
    Calin Cali wrote: guess converting the object(pointer) back to it`s original form when time comes to use it somewhere works the same Yes it should do, but you need to run some tests to make sure.
  • #define won't work in QStringList , gives no error

    debugging help question
    4
    0 Votes
    4 Posts
    6 Views
    L
    Basically I can build a string then "convert it" to char, Neat trick. Thanks
  • moving graphics in a win32 c++ window

    c++ graphics
    6
    0 Votes
    6 Posts
    8 Views
    L
    I would suggest you remove that link from your message (and future ones), as the system assumes it is spam. And some people here will just flag the message which means it will not get published.
  • FileMapping book exmple goes in loop

    c++ performance tutorial learning
    4
    0 Votes
    4 Posts
    7 Views
    Mircea NeacsuM
    You are very welcome! Mircea
  • defining a function with #define

    help tutorial question
    7
    0 Votes
    7 Posts
    9 Views
    C
    Thank you all for your responses.
  • How to read an xlsx file using CDatabase

    database c++ help tutorial
    8
    0 Votes
    8 Posts
    12 Views
    S
    Figured it out on my own. Things to be asked or answered. 1) My application is 32 bit. 2) I have MDAC 64 bit on my windows 64bit OS. 3) When the CDatabase OpenEx executes with connection string i mentioned in my above code, it checks in ODBC32.exe in which the required driver (xlsx) is not available. 4) We must have to install the MDAC 32 bit and the required driver to read the xlsx file is will be available. Hope this answer will be helpful to others in future and thought of writing my analysis. Regards Sampath. Questioning is an Art and Answering will be done by only an Artist.
  • How to use UTF8 characters in C++

    c++ tutorial question
    4
    0 Votes
    4 Posts
    10 Views
    J
    Adding u8 worked, thanks. As for CMD it was used only as a testing display, I don't need it in the actual app, and for testing I ended up writing to a file to see if it is working. And where I actually used it, it did worked.
  • 0 Votes
    3 Posts
    7 Views
    M
    Thanks Victor for explaining i s in the wrong forum i did for look for a managed C++ CLI forum but i totaly failed :) I will moved my question to the right one now :¬)
  • communicate with usb (MTP) device and IOCTL

    com question
    2
    0 Votes
    2 Posts
    5 Views
    Z
    How about trying this? GENERIC_READ || GENERIC_WRITE, FILE_SHARE_READ || FILE_SHARE_WRITE Change those above to: GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE
  • 0 Votes
    1 Posts
    2 Views
    No one has replied