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
  • Sir? Builtin Function Help

    help question
    10
    0 Votes
    10 Posts
    0 Views
    D
    If you can't write a function to search for a specific character in a text file, ('\n'), counting how many times you see that character, your code isn't worth hiding. Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles. Dave Kreskowiak
  • How to Convert a Webpage in Android

    question android com game-dev tutorial
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • I am creating a program with Visual Basic Script files with C++.

    c++ tools
    8
    0 Votes
    8 Posts
    10 Views
    V
    Have a look at [ShellExecute](https://docs.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-shellexecutea) or/and [ShellExecuteEx function (shellapi.h) - Win32 apps | Microsoft Docs](https://docs.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-shellexecuteexa)
  • Debug assertion failed in occcont.cpp file

    c++ help debugging question
    3
    0 Votes
    3 Posts
    4 Views
    L
    It is a reasonable guess that pTemp->m_hWnd is not a valid Window handle. How that came about is impossible to guess. You need to use your debugger to gather more diagnostic information. Also there is some information at Debug Assertion in occcont.cpp Line: 926[^] which may help. But either way this looks to be a Microsoft problem, so you should report it (with full details) to them.
  • Antivirus login

    com help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • MPEG 2 and 2.5 - problems calculating frame sizes in bytes

    help question tutorial
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Handling large numbers

    com algorithms
    6
    0 Votes
    6 Posts
    0 Views
    D
    Given the OP's code, I was simply pointing out that if too few operations are done, some numbers won't reach 1. For example, 47 takes 103 operations in order to reach 1, and 231 and 235 both take 127 operations in order to reach 1. "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
  • Create a timer

    question c++ help
    4
    0 Votes
    4 Posts
    1 Views
    D
    How about create your program to just do the file I/O, and then let windows handle the timer/scheduling part? "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
  • Handling large numbers

    com algorithms
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Help me - C++

    c++ help
    7
    0 Votes
    7 Posts
    0 Views
    L
    Member 7989122 wrote: They are equivalent. And nicely confusing. ;)
  • Invalid operands to binary expression

    help csharp visual-studio question
    10
    0 Votes
    10 Posts
    1 Views
    L
    Then don't return a value. Leave it as void and remove the cout call at the end of your main method. BTW in future please open a new question if you have a problem, rather than reopening a thread that is over two years old.
  • 0 Votes
    5 Posts
    0 Views
    Mircea NeacsuM
    Don't know about your apps but for mine, I run Dependencies ( GitHub - lucasg/Dependencies: A rewrite of the old legacy software "depends.exe" in C# for Windows devs to troubleshoot dll load dependencies issues.[^], make a list of required DLLs. As I said, for the C++ runtime, I didn't have troubles recently. This was such a relief coming from the horrible days of VC2010 with those dreadful SxS assemblies. Mircea
  • Efficient way to read/write file

    c++ tutorial question
    12
    0 Votes
    12 Posts
    0 Views
    C
    I catch what you are saying, it just seemed to me that for the context of the original question the discussion veered. No harm or foul. Charlie Gilley <italic>Stuck in a dysfunctional matrix from which I must escape... "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
  • Recursion to normal way

    help data-structures
    24
    0 Votes
    24 Posts
    0 Views
    L
    Member 7989122 wrote: I might give it a try (maybe 35+ years of coding experience will make it appear simpler), but I haven't got the time right now. Same here, although coming up for 55 years. One day soon ... ;)
  • 0 Votes
    7 Posts
    1 Views
    J
    PrafullaVedante wrote: considering the user will never keep itself block for 49 days .... I have. Code starts and a section of it waits for a global shutdown object to be signaled. (That aside, I believe Raymond Chen has confirmed that INFINITE really is infinite.)
  • 0 Votes
    2 Posts
    0 Views
    L
    opensource version of telnet client - Google Search[^]
  • How to draw a realtime XY plot in MFC

    c++ tutorial
    7
    0 Votes
    7 Posts
    0 Views
    C
    There are many good articles about drawing in mfc - which is really pretty much Win32. Rather than have that magical moment where you get it running and it flickers constantly, make sure to look into double buffering with a bitmap. Charlie Gilley <italic>Stuck in a dysfunctional matrix from which I must escape... "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
  • Transpose of a matrix

    question
    6
    0 Votes
    6 Posts
    1 Views
    J
    b[j][i]=a[i][j]; printf("%d ",b[i][j]); So you wanted to print the value of b[i][j] after you updated b[j][i]? "the debugger doesn't tell me anything because this code compiles just fine" - random QA comment "Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst "I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
  • Random numbers

    csharp c++ question lounge
    11
    0 Votes
    11 Posts
    0 Views
    CPalliniC
    You are welcome.
  • 0 Votes
    3 Posts
    1 Views
    L
    You should read through every section of Organization of the C Language Reference | Microsoft Docs[^]. You will learn much faster than by posting questions here.