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
  • IsFileReady

    question help career
    8
    0 Votes
    8 Posts
    0 Views
    D
    Subject to the limitation you mentioned, that would work, too. Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.
  • how to change spotify username

    com help tutorial
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • srandom and random

    help tutorial question lounge
    9
    0 Votes
    9 Posts
    0 Views
    V
    See the Remark section in [rand_s | Microsoft Docs](https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/rand-s?view=vs-2019)
  • error C3861: 'major': identifier not found

    help c++ question csharp
    9
    0 Votes
    9 Posts
    1 Views
    S
    Yes, it's entirely possible you won't find a match. That is the problem with language extensions, and the reason why many projects insist on staying compatible to the C++ standard instead. 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)
  • Redirect to my struct

    question
    18
    0 Votes
    18 Posts
    1 Views
    S
    _Flaviu wrote: #ifdef SID typedef ... SID; Sorry to be rude, but that's bullsh1t! If there really is a #define for the symbol SID anywhere in your code or your precompiler options, then your ccode will most likely never compile, because any attempt to use, declare or otherwise reference a struct SID will be turned into garbage by the precompiler which replaces the symbol with something else! So, unless and until you make sure that nobody does such a #define, there is no point looking further! And then, of course, the #ifdef makes no sense - not that it did before. 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)
  • 0 Votes
    9 Posts
    0 Views
    C
    I'm going to close this out for posterity's sake. Part of the problem with having to use VS2008 is that people who make extensions don't test against very old versions, and let's face it, 2008 is a gnarly old thing (but it's better than EVC++). Anyway, a long about December of last year I was trying to track down an issue with stack allocation. One tool I tried to use is Intel's VTune. Once installed, my woes began. I scrubbed everything to recover. Not only did it hose the breakpoints, but things would not compile, etc. I'm a busy guy, and I hate not being able to go back and do a true cause analysis. New post coming up :) 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
  • setw irrational behaviour

    debugging visual-studio linux help question
    6
    0 Votes
    6 Posts
    0 Views
    CPalliniC
    Quote: usual note that I am looking for a solution to an issue, not for commentaries on my code style :-D :thumbsup:
  • Abstract Factory Design/Linked List Problem

    help c++ design data-structures regex
    8
    0 Votes
    8 Posts
    0 Views
    S
    Quote: The AddNode and PrintList functions of the Linked list aren't working. (StaffMain.cpp). I don't know about AddNode(), but your PrintList() function doesn't print anything: it calls the function staffDetails(), and maybe you intended that function to print out some information, but what it does instead is create a new object, which by the way creates a memory leak because you're not using the return value. I think your problem is that your list stores factories, not staff, and that some(?) of the functions don't do what their name implies. 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)
  • 0 Votes
    3 Posts
    0 Views
    L
    See _stat Structure st_mode Field Constants | Microsoft Docs[^].
  • Bug in ETSLayoutMgr::DeleteReg()

    help windows-admin
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • 0 Votes
    2 Posts
    2 Views
    A
    Hi Did you go with this in the end? Andrew
  • C++ control textBox of Form1 and Form2

    c++ mysql help tutorial
    3
    0 Votes
    3 Posts
    1 Views
    V
    Is it a native or managed c++ code? :confused:
  • queues to find minimum time to serve all.

    help com data-structures tutorial question
    3
    0 Votes
    3 Posts
    0 Views
    L
    The solution is called a scheduler ... google "tutorial task scheduler in c" In vino veritas
  • How to check if USB filter driver be installed by MFC?

    question c++ tutorial
    2
    0 Votes
    2 Posts
    0 Views
    L
    See Win32\_USBHub class | Microsoft Docs[^]
  • 0 Votes
    2 Posts
    0 Views
    L
    the knight problem - Google Search[^]
  • IRichEditOle::InsertObject shifts text one byte

    graphics career
    6
    0 Votes
    6 Posts
    1 Views
    L
    Most image files and types have the size encoded in them. I don't know how you are loading the bitmap into the reobject variable but presumably you can check the source file/object.
  • 0 Votes
    3 Posts
    1 Views
    L
    Vaclav_ wrote: Being repeatedly told that I am not sharing my code is getting old. And there is an easy way to prevent that ...
  • SOLVED CASE CLOSED cout in color and perror - revisited

    help c++ tools question
    8
    0 Votes
    8 Posts
    0 Views
    L
    Taking your code above and running it produces the following output: C:\Users\rjmac\Documents\Code\C++>Test Function: DoTest START test area 17 TEST perror : No error --> in normal black TEST perror : No error --> in bold red TEST perror : Input/output error --> in bold red HELLO! --> in green red text --> everything from here in normal red Hello World Bluetooth client START test area 36 DoTest Which does not match with what you have produced. I can only conclude that there is something else going on in your system, or the actual code you run is different, that you are not telling us about.
  • How to close file in C++?

    c++ help tutorial question career
    5
    0 Votes
    5 Posts
    0 Views
    V
    I am just looking to verify "hosts" names. And I realize that using vim is asking for complications, especially when I actually need to use / select "name" for further processing. vim is bad idea.
  • Do "setw(offset) " BEFORE cout ?

    tutorial question
    7
    0 Votes
    7 Posts
    0 Views
    L
    Vaclav_ wrote: I am finding out this setw does not always work More likely, you are finding there are bugs in your code.