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
  • Problem in binary search using C++

    c++ help
    5
    0 Votes
    5 Posts
    0 Views
    V
    You should format your code snippet with the proper indentations.
  • 0 Votes
    1 Posts
    0 Views
    No one has replied
  • Device Running Windows CE 6.0

    hardware help
    4
    0 Votes
    4 Posts
    0 Views
    CPalliniC
    Quote: I don't know using hardware device for project. You should ask more specific questions in order to get help. For instance, what device are you talking of?
  • Pointer to Pointer: Conversion from- C++ to C-language

    c++ help tutorial
    17
    0 Votes
    17 Posts
    27 Views
    S
    ChrisFromWales wrote: The last version of **cfront** was released around the time that the C++ language added templates [...] cfront version 3.0.3 from May 1994 [...] This can't be right. I remember programming templates around ~1988 when I was at university, working with PHIGS[^] . cfront did require multiple passes to correctly translate some templates, and was restricted more than the language specification would allow in theory. But for the most part it could handle templates back then. Since there was no C++ standard in existence, it's hard to say at what time, exactly, cfront supported templates fully though: it led a catch-up races with the C++ designers who kept introducing new features. GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
  • how i can disable key from keyboard of computer using C language

    5
    0 Votes
    5 Posts
    0 Views
    D
    Technically, the C programming language has no such provisions. You will need to interact with the hardware using specific APIs. Now depending on how you answer Victor's question, there may be a solution to the question you meant to ask. "One man's wage rise is another man's price increase." - Harold Wilson "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
  • 0 Votes
    9 Posts
    0 Views
    J
    Daniel Pfeffer wrote: I thought that Unix called them descriptors I think that is the formal way it is used. But I found the other usage elsewhere.
  • Know when a files has been copied

    c++ question
    4
    0 Votes
    4 Posts
    0 Views
    D
    There is nothing that will tell you when a file is "copied". There is really no such operation. All a copy is is a file being opened for read and another being opened for write. The bytes in the first file are read and then written to the second file. You cannot get a notification of the read but you can for the file being created. See the links the other have posted for that. Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles. Dave Kreskowiak
  • Change value to a thread

    question career
    14
    0 Votes
    14 Posts
    0 Views
    V
    Yes! Sorry for the typo! :sigh:
  • 0 Votes
    4 Posts
    0 Views
    L
    Gaurav__Kapoor wrote: i feel the issue is because of Forget what you feel and study the documentation. That is the only way to understand the code.
  • 0 Votes
    2 Posts
    0 Views
    S
    If you want to 'document' where you're writing to, why not just provide several functions that offer this information right in their name? E. g.; void setreg_A(uint16_t aval); void setreg_B(uint16_t bval); void setreg_C(uint16_t cval); void setreg_all(uint16_t aval, uint16_t bval, uint16_t cval); If that isn't what you want, what is? Can you show a line of code that would invoke your 'clever macro'? It's hard to say what is your intention without seeing how you're going to use it. GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
  • MSN Customer Service Number

    php database com sales collaboration
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • 0 Votes
    14 Posts
    0 Views
    M
    Hi Victor, I am not sure I am using the CodeProject System correctly! Am I expected to give an up or down vote with the red and green triangles? I am using Visual Studio 6.0. The dsw file just brings up the program in workbook form. I can only go into Properties from Notebook.exe for XP Compatibility plus Run as Admin, and that is not helping me to get the coding I want to look at. I want to add RTF to my text, and later graphics in the Answer section. The Notebook program was written in Visual C++ but mostly C++. It is a simple Q & A dialog box I programmed for study questions and answers. I wrote that program in Feb. 2004, and I am now retired, so I want to get back to learning. I have a considerable investment in the VCPP6 and VB6 library volumes. I want to stay with VS6 because the programs will be only for me, and I do not intend to write many. I can see the compiled code, but I cannot regenerate my original write-up code from that! If I run the debug there is supposed to be a way to make a file that tracks my code, but that is during the original compile and debug process. Only Windows XP is compatible with my program. I have Windows 7 Pro now on my HP Pavilion 515n 32-bit computer and running compile, rebuild, or debug just destroys the program. Fortunately I keep backups of Notebook. It runs fine on Win7, but not much use to understand my original write-up code way back then! I mainly use the 32-bit to backup my Palm Pilot monthly and run a free-space drive wipe after. Don't worry, I have an HP ENVY 700-210xt SSD 64-bit on Windows 10, but free-space wipe on it would be write steps that burn SSD life (read is fine, but not write). Also, I want to keep my programming mess away from the 64-bit computer. I am currently looking into using a VM with Windows XP inside to run my program with all functions.
  • Technical Interview Preparation

    com question career
    4
    0 Votes
    4 Posts
    0 Views
    J
    I love this guide for getting started: Getting Started with Coding Interviews - Byte by Byte[^] and also recommend their post Ace Your Google Interview[^] since the interview process is so similar. Best - Jenna
  • Add tool tip to menu

    6
    0 Votes
    6 Posts
    0 Views
    P
    NoviceEx wrote: However function IsMenu((HMENU)lpar) returns FALSE. Does anybody has idea why ? Did you try to debug this function? This would allow you to know why it returns false. noop()
  • 0 Votes
    8 Posts
    0 Views
    T
    thank you,I have debug successfully! ;P
  • 0 Votes
    2 Posts
    0 Views
    L
    It is not clear what the actual problem is, and why you cannot build the library in the same way that you build the rest of the system. Linking a library to an application should work if both sides have been built to the same target architecture.
  • 0 Votes
    10 Posts
    0 Views
    V
    It appears that the available source and 64 bit OS (I am using) is being confirmed as an issue. I would hope if quint64 was "typedef" it would be in gtypes.h header. It is not there, maybe it is not needed to be "typedef". I am still not sure why when (quint64) is used it is typecasted as "long long" when the define I found is just "long". I guess I need definition of "long" as used by glib code. Perhaps I could just try to change the typecast to (unsigned long) but not sure why it would work. What is really bothersome is that the comments in the header file clearly states "use the macros above " and not the failing function. .
  • C++, java

    c++ java help
    4
    0 Votes
    4 Posts
    0 Views
    L
    See Pulling data from one form to another[^]. And please do not post the same question in different places.
  • Has C++ ever considered XML style namespaces?

    c++ xml help question
    10
    0 Votes
    10 Posts
    0 Views
    S
    CPallini wrote: Verbosity does not imply clarity That's why I said 'should' CPallini wrote: (still, I believe that 'i' is a better name than 'index') I agree that 'index' is no more useful a name than 'i'. If there is any implied meaning to an index other than being the i'th element in a container, I prefer a variable name that reflects this meaning. For example if I have a curve consisting of several joined edges, I prefer 'edge_index' over 'i' or 'index'. Not only does this add clarity, it also makes my code extendable: if I later find I want to process each edge as a list of points, I have no problem naming the nested loop variable as 'point_index', and i wouldn't need to rename the existing loop variable. GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
  • Calling python function from c++

    help question c++ python
    4
    0 Votes
    4 Posts
    0 Views
    CPalliniC
    Assuming you are using Visual Studio on Windows, have a look at Python support in Visual Studio on Windows | Microsoft Docs[^].