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
  • Will casting / passing 16 bit int as double harm FFT processing?

    question help
    14
    0 Votes
    14 Posts
    3 Views
    V
    Thanks for reply. Somehow I did not get the message across and the main question is getting muddled by stuff I am not so concerned about. The bottom line - which I actually just wanted someone to confirm - is that casting pointers from integer to double is a stupid idea. Thanks Case closed
  • Eigen library : compile error

    help c++ html tutorial question
    3
    0 Votes
    3 Posts
    0 Views
    C
    The code is correct C++, except that this header file will only compile if included after Core, as it is in Eigenvalues: #ifndef EIGEN_EIGENVALUES_MODULE_H #define EIGEN_EIGENVALUES_MODULE_H #include "Core" ... #include "src/Eigenvalues/HessenbergDecomposition.h" src/Eigenvalues/HessenbergDecomposition.h is not supposed to be included directly. What is the cpp file that you're trying to compile?
  • Signed integers considered harmful?

    help question
    14
    0 Votes
    14 Posts
    0 Views
    C
    Lots and lots of things in C++ (and C for that matter) can lead to undefined behavior if preconditions are not met. Signed integer arithmetic is just one of many. If you're programming in this language, you should be used to dealing with narrow contracts. So, no, they shouldn't be avoided. Deal with them depending on the situation, in many cases an assert will suffice. Pretending it's not a problem is fatal. (and no, gcc isn't the only compiler that assumes that naive signed overflow checks are always false)
  • Vector Iterator Incompatible

    graphics help question
    3
    0 Votes
    3 Posts
    3 Views
    M
    I am canning this routine as the vector may end up being modified. Thx for the input.
  • matrix svd decomposition problem

    help c++ question
    5
    0 Votes
    5 Posts
    0 Views
    CPalliniC
    You are welcome. Don't become discouraged, maybe rounding made things more complex in your case. THESE PEOPLE REALLY BOTHER ME!! How can they know what you should do without knowing what you want done?!?! -- C++ FQA Lite
  • Formview scroll problem

    question design help learning
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Socket Programming(UDP)

    help c++ sysadmin hardware json
    4
    0 Votes
    4 Posts
    0 Views
    L
    Well that seems to be your answer.
  • Converting a string to a double

    question
    3
    0 Votes
    3 Posts
    0 Views
    J
    You can use the wide char versions of atof()[^] or strtod()[^]. If the string does not begin with the numeric value (spaces are ignored), you must parse the string and pass a pointer to the value's offset.
  • VC++ console application - client / Server

    sysadmin question c++
    21
    0 Votes
    21 Posts
    1 Views
    J
    Run "ipconfig /all" at the command prompt. Look at the results, there should be data given about each NIC card on YOUR machine. Look at the line that says "IP Address.......xxx.xxx.xxx.xxx" (there may be several). Make a list of these IP addresses. If "86.57.91.237" is not in that list, then you can not bind to it. Meaning it is not an IP address associated with a NIC on your computer. "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
  • Converting char* to double

    data-structures question
    4
    0 Votes
    4 Posts
    3 Views
    J
    atof() is part of the standard C library that uses the general 'C' locale by default while stringstream is C++ which uses the current system locale by default. You can use the setlocale()[^] function to change the locale for the standard C library functions (pass an empty string to use the environment's default locale).
  • Vector index to iterator

    database graphics help
    4
    0 Votes
    4 Posts
    0 Views
    CPalliniC
    It doesn't work because it is wrong. Quote: std::vector::iterator* it= myVec[i]; You are trying to assign a value (not an address) to an iterator. Please note, even std::vector::iterator* it= &myVec[i]; Would NOT WORK, because iterators are not exactly pointers. THESE PEOPLE REALLY BOTHER ME!! How can they know what you should do without knowing what you want done?!?! -- C++ FQA Lite
  • PRINTDLG to CPrintInfo

    question
    15
    0 Votes
    15 Posts
    0 Views
    _
    Thank you Richard, deleteing CPrintInfo object is excluded, the destructor is the only place where I explicity delete this object ... I have to dig in ...
  • 0 Votes
    3 Posts
    0 Views
    J
    As the other reply stated, a full error message would be handy. Just a thought, you're definitely linking against a static library built for ARM as well ?
  • 0 Votes
    4 Posts
    0 Views
    L
    Terry Milewski wrote: from what I have read it appears that there may be a way to compile a Winforms or WPF into a stand alone application which can be run without .net frameworks. Since both rely totally on the .NET framework I do not think that is correct. If you do not want to rely on .NET then C++ (with or without MFC) is your only real choice.
  • Split Window

    question
    2
    0 Votes
    2 Posts
    0 Views
    D
    See if this article (specifically steps 2 and 3) is of any help. "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
    2 Posts
    0 Views
    L
    see http://msdn.microsoft.com/en-gb/library/windows/desktop/aa376890(v=vs.85).aspx[^].
  • Similar pattern recognition in 1920 x 1080 Images

    algorithms regex question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Regarding Parameter in C (GCD of 2 Numbers)

    5
    0 Votes
    5 Posts
    1 Views
    A
    Driganka Mandal wrote: int GCD(num1,num2); int is the default type... but that function declaration isn't exactly kosher (think it would be invalid for any C compiler, C++ compilers tend to be more forgiving but that doesn't mean it's part of the standard).
  • 64bit com dll not get registered

    com help
    2
    0 Votes
    2 Posts
    0 Views
    L
    The message is telling you what is wrong, you need to investigate why it is happening. See http://msdn.microsoft.com/en-gb/library/windows/desktop/bb759846(v=vs.85).aspx[^].
  • VC++ console application - client-Server

    sysadmin question c++
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied