 |
 |
Apologies for the shouting but this is important.
When answering a question please:
- Read the question carefully
- Understand that English isn't everyone's first language so be lenient of bad spelling and grammar
- If a question is poorly phrased then either ask for clarification, ignore it, or mark it down. Insults are not welcome
- If the question is inappropriate then click the 'vote to remove message' button
Insults, slap-downs and sarcasm aren't welcome. Let's work to help developers, not make them feel stupid.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
 |
For those new to message boards please try to follow a few simple rules when posting your question.- Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
- Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
- Keep the subject line brief, but descriptive. eg "File Serialization problem"
- Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
- Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
- Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
- If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode HTML tags when pasting" checkbox before pasting anything inside the PRE block, and make sure "Ignore HTML tags in this message" check box is unchecked.
- Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
- Please do not post links to your question in one forum from another, unrelated forum (such as the lounge). It will be deleted.
- Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
- If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
- No advertising or soliciting.
- We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
 |
I have a VC++/MFC application.This was in ancient code, visual studio 6. While compiling it in VS2010 it gave tons of errors and required changes in settings. I got good guidance from http://www.codeproject.com/Members/Jochen-Arndt.
Now my project is compiling/linking and .exe file is also launching.
While the application is running since output is in Japanese so in English OS it shows all junk characters.
Now i take the whole code base to Japanese windows OS, compile the code and run the application there,
Why do I still see the junk characters on application dialogue boxes/captions/ Labels ?
Any area you can hint I can look into display caption/labels/dialogue box in Japanese ?
Please help.
|
|
|
|
 |
The obvious question: have you selected Japanese font into the application's resources?
|
|
|
|
 |
Obvious answer...that's why its showing Junk characters in the english OS.
modified 12 hrs ago.
|
|
|
|
 |
Can someone point me to some C++ or C# examples on how to loop thru a group of similar CSV files and import them to an access db? Thanks.
|
|
|
|
|
 |
Hi,
I am working on a project which requires to use a web service in C++ native application. I have searched on the net and found many links which explains that it is possible using C++ REST SDK. I have downloaded and installed the C++ REST SDK for visual studio 2010 but couldn't find any sample application using REST SDK to call a web service.
Can anyone help me regarding this. How to use a web service in C++ using REST SDK.
Regards,
mba
|
|
|
|
|
 |
I have recently written a 'project browser' ctrl for my hobby ide BUT when i right click on an item to 'select item and show menu' even though the carat is on the new item the control reports the active TREEVIEWITEM is the previously selected item and the menu acts on the prev selected item.
With listboxes its easy you just subclass the ctrl and simulate "press lmb down and lmb up" when rmb is pressed but this method doesnt work at all with treeviews.
How do i select a item with the rmb?
Ps. you can be technical with your responce, im v.familiar w/ winapi.
thx bob
Sorry guys lol. Just solved it. You use the TVM_HITTEST to get the current item under the mouse cursor then call TVM_SELECTITEM w/ that item.
Then call trackpopupmenu as normal.
4 hours wasted last night on that one... still happy ending.
modified yesterday.
|
|
|
|
 |
What messages or notifications are you responding to?
|
|
|
|
|
 |
Your summation function makes no sense. You pass in a parameter which is ignored and then do some fairly random calculations, and return the value which will be zero, after a single iteration of the loop.
|
|
|
|
 |
so as far as u say which way i should proceed?
actually my logic was not working so was planning to implement kahan summation.
|
|
|
|
 |
maibam debina wrote: so as far as u say which way i should proceed? Well the first thing you need to do is to define what the summation function is supposed to do; I cannot make any sense out of it. Once you have done that, then define the steps required and convert them to code. It would probably help you immensely to use meaningful names for your variables rather than single letters which make it difficult to understand.
|
|
|
|
 |
can u please help me out with code...:(
|
|
|
|
 |
Well I could, but i) I have no idea what your summation function is supposed to do, and ii) you would learn more by trying it yourself.
|
|
|
|
 |
Actually the logic which i use to implement for performing the summation was
<blockquote class="quote"><div class="op">Quote:</div>for(i=0;i<5;i++)
{ float f= ((float)rand()/(float)(RAND_MAX))*a;
y=square(f);
sum +=y;
}
printf("\n Summation Of Square Number is:=%f\t\n",sum); </blockquote>
but it doesnot seem well its not giving the exact summation value,all i want was to perform summation of the generated float random numbers .
|
|
|
|
 |
Are you sure that sum contains zero at the beginning of the loop? In the statement:
float f= ((float)rand()/(float)(RAND_MAX))*a;
what is the value of a ?
And since you are not printing any of the intervening values, how can you be sure the final sum is not correct?
|
|
|
|
|
 |
for(i=0;i<5;i++)
{
float f= ((float)rand()/(float)(RAND_MAX))*a;
printf("%f\t",f);
y=square(f);
printf("\t\t%f\n",y);
}
for(i=0;i<5;i++)
{ float f= ((float)rand()/(float)(RAND_MAX))*a;
y=square(f);
sum +=y;
}
printf("\n Summation Of Square Number is:=%f\t\n",sum);
i have print at the 1st for loop...:(
|
|
|
|
 |
And in the second loop you will have a different set of numbers, as returned by the calls to rand() . I also cannot find a reference to square , is this another function in your code?
|
|
|
|
 |
ya it is thank fren i got it...matter was with the printf statement i gav at second loop ,wen i pass the printf statement inside the 1st loop itself n removing the second for loop as condition where same ...den i got the exact answer..
|
|
|
|
 |
What are you doing?
OK, you are trying to implement the "Kahan summation algorithm"[^].
However you have to read carefully and understand it, before actually coding.
For instance, as shown by the algorithm pseudo-code[^], the parameter to the summation function must be an array, while you are using a float.
THESE PEOPLE REALLY BOTHER ME!! How can they know what you should do without knowing what you want done?!?!
-- C++ FQA Lite
modified yesterday.
|
|
|
|
 |
i tried using array but seem it not working can u please help me out with code making modification...actual thing what i want is to do the summation of all the generated random number which is store at b.
|
|
|
|
 |