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
  • 0 Votes
    3 Posts
    0 Views
    D
    First ask yourself: what constitutes a duplicate value? Instead of going straight to the keyboard to solve this problem, sit at the table with a deck of cards. Ignoring the suits, lay all (or a portion) of the cards out in front of you. Now working from right to left, work through each card and see if it qualifies as a duplicate per your answer from above. This might look something like: Compare card 52 to card 51. If they match, remove card 52 from array. Compare card 51 to card 50. If they match, remove card 51 from array. Compare card 50 to card 49. If they match, remove card 50 from array. ... Compare card 1 to card 0. If they match, remove card 1 from array. An alternative would be if the card is unique, move it to a separate array. Now you can destroy the original array and be left with an array of just unique items. There are other ways to skin this cat, but it's really going to boil down to what makes the most sense to you. You might not initially have the most elegant or efficient solution as others on this board could come up with, but those skills come in time. "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
  • http://healthyboosterspro.com/athletic-greens/

    com
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • 0 Votes
    15 Posts
    0 Views
    J
    Good to know, but I was refering more to Jochen's 'discovery' of placement delete. "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
  • 0 Votes
    4 Posts
    1 Views
    S
    Here is a link to a visual studio project which demonstrates my issue. If anyone can explain why the clicking of the button on the ribbon generates a new menu entry which does not get acted upon I would be very grateful. https://onedrive.live.com/redir?resid=96603E24528956FC!133&authkey=!AAopnvy2aTNr1tY&ithint=file%2czip[^] Thanks Steve.
  • 0 Votes
    6 Posts
    1 Views
    D
    Don't you think your first two assumptions are a bit like click-baiting for a response? One approach is to make your thesis into providing a "novice" or a Java or C# developer the ability to rapidly create a C/C++ application without having to know how to use pointers or code in the language. :cool: Look back at something called "Software through Pictures" STP, and there is another product one of the process control companies makes for modeling potential solutions. Good luck with that.
  • SFTP in VS6

    c++ question sysadmin
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • 0 Votes
    3 Posts
    0 Views
    D
    Daniel Pfeffer wrote: (i.e. using a binary blob rather than a string). I agree. :thumbsup: "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
  • how to solve riccati equation differential in c++ or java

    c++ java dotnet tutorial
    3
    0 Votes
    3 Posts
    0 Views
    D
    There are many numeric approaches to solving sets of differential equations. As long as the numerical equations can be represented as a set of functions of the form: dy(x)/dx = f(x) you should find an appropriate solver. One family of numerical solvers is the Runge-Kutta family, and there are many others. Any numerical analysis book should have details. If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack. --Winston Churchill
  • Issue with CFolderPickerDialog

    help question
    3
    0 Votes
    3 Posts
    0 Views
    P
    Ok Thanks!
  • Strange compiler error

    help
    4
    0 Votes
    4 Posts
    0 Views
    J
    I had such compiler errors in the past with older VC versions. Quote: To work around this problem, try simplifying or changing the program near the locations listed above. I always solved the problem following the above. There was one case where it could be solved by just exchanging two lines of code. In the other cases, I re-ordered some code or moved code to an additional function. I don't remember if I had the linker error afterwards too. But it is obviously sourced by the compiler error (the compiler exits immediately when that error occurs).
  • Code Signing Verification

    question visual-studio com cryptography
    3
    0 Votes
    3 Posts
    0 Views
    Richard Andrew x64R
    Bingo! Thank you very much. :-D The difficult we do right away... ...the impossible takes slightly longer.
  • After including #include <atlbase.h> I am getting error C2632

    help
    5
    0 Votes
    5 Posts
    0 Views
    P
    Thanks for response. Actual I had a non ATL C++ application, to which I need to add Text to speech(https://msdn.microsoft.com/en-us/library/jj127898.aspx[^]), and hence I was trying to add #include extern CComModule _Module; #include And there by started with this issue.
  • Are they the same? The button and MFC button control

    question c++ tutorial
    2
    0 Votes
    2 Posts
    0 Views
    L
    The Button is a standard Windows control that can be used in a Win32 or MFC application. The MFC Button Control[^] is an MFC class that 'wraps' the standard Button, but can only be used in MFC applications.
  • problem in solving "C4996" error

    help csharp visual-studio
    5
    0 Votes
    5 Posts
    12 Views
    L
    Thank you Sir for your kind help.
  • Passing double pointer to function

    question
    2
    0 Votes
    2 Posts
    0 Views
    L
    elelont2 wrote: To me they seem like the same thing. No, they are totally different. Case 1: You create a pointer that will point to an integer variable, and pass its address to the function. The function then stores the address of a variable inside the pointer. On return the pointer now points to the variable, and the variable contains a value. Case 2: You create a pointer that will point to a pointer but is currently NULL. So when you pass it to the function the function gets a NULL value. Simply put, in case 1, hello points to the address of pointer, in case 2, hello contains NULL. If you step through the code with your debugger it should become clear.
  • 애플카지노≫Ж≪ N G P 7 。C O M ≫Ж≪ 코리아카지노

    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Resize a Dialog Box (MDI-Application)

    c++ question
    3
    0 Votes
    3 Posts
    0 Views
    S
    Thank you, works like a charm. ;) "The Only Limit Is Only Your Imagination."
  • Floating point conversion

    help
    12
    0 Votes
    12 Posts
    0 Views
    S
    I am not seeing this issue. I get 4 for unResult. Do you have your floating point options set correctly in the compiler? In visual studio, select properties on your C project. Expand the projects setting out for "c/C++->Code Generation" and set the option for "Floating Point Model" to Precise(/fp:precise).
  • Splitting Video

    question help
    2
    0 Votes
    2 Posts
    0 Views
    L
    Please read http://www.codeproject.com/Messages/2922875/HOW-TO-ASK-A-QUESTION.aspx[^].
  • Need a suggestion in handling a file in C

    help tutorial
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied