|
the results are correct; the modulo is the remainder of the division.
(1 + 7) / 10 = 0 + 8
(2 + 7) / 10 = 0 + 9
(3 + 7) / 10 = 1 + 0
(4 + 7) / 10 = 1 + 1;
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
why is it that 11%10 the answer is 8.it display the answer not the remainder?
thanks...!
|
|
|
|
|
|
Hi,
I am facing one problem in compiling a VC++6.0 project.
I have to build a EXE project, and it uses only C files. ( Not C++ ).I
require to build the EXE project in VC++ 6.0 version, and I am getting
the following error.
"C:\Program Files\Microsoft Visual Studio\VC98\MFC\INCLUDE\afx.h(15) :
fatal error C1189: #error : MFC requires C++ compilation (use a .cpp
suffix)"
Error executing cl.exe.
Please help me out, if anybody knows its solution.
Appreciate your comments/reply regarding this problem.
Thanks
vikram
|
|
|
|
|
vikram yadav wrote:
I have to build a EXE project, and it uses only C files.
Which means you cannot use MFC.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
You've created the project as an MFC project instead of a generic application.
So the compiler is looking for your "stdafx" files. You probably want to create a non-MFC project...a simple Win32 application.
Try running AppWizard again, selecting the "Projects" tab. Under there, pick "Win32 Application". Set your directories and project names, etc. and finish running through the wizard. Once the project is built, copy all of your original source code into the new diretory, and "Add Files to Project..." to include your original files.
Hope it helps!
Bob Ciora
|
|
|
|
|
what is the command use to get the modulus of a number?
|
|
|
|
|
The modulo operator is the % symbol.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
4 % 3 = 1
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I have a second thread in my application, created like this:
Thread* secondThread;<br />
ThreadStart* second = new ThreadStart(this,my_method);<br />
secondThread = new Thread(second);<br />
secondThread->Start();
This thread does not close when I close down the application.
I tried with "Abort".
I guess I need some try-catch, but sot sure how to use it...
tried with this in the generated dispose method...
try{<br />
secondThread->Abort();<br />
}<br />
catch(char* szException){}<br />
components->Dispose;
...this didn´t work.
Any suggestions as to how to close the thread. (doesn´t need to be "proffesional" as I´m just building a test app with really dirty coding...)
Also...is the creation of the thread the "best" way to create a thread (I have seen a couple of different solution, though this was the one that I found easier imediately.
regards,
doneirik
|
|
|
|
|
Try ExitThread or TerminateThread but read the doc before you use it!
|
|
|
|
|
See here.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi, I'm not sure if this is the right place to ask such a question, but I couldn't find a DirectX forum.
Is it possible (and how?) to add several audio files to one filter graph which already contains a video file and control their volumes independently?
As far as I understand is the "IBasicAudio Interface" only able to control the entire volume of the graph? I couldn't figure out how to access the DirectSound Interface from the filter graph.
Or do I need to construct a second graph and synchronize the playback of the two graphs?
Any help would be great!!!
Thanks,
Knut
|
|
|
|
|
I need to display two "nested" controls side by side. The main control e.g. CCustWnd constains another CMembWnd control as a member variable. It is not problem to display the main CCustWnd control however I don't know how to display the member control CMembWnd which is created dynamicaly when the main control is created . Probably the member control is clipped by the main control. I played for while with styles without any results. Probably it is not problem to display the member control inside the area of the main control however I need to display the member beside the main control (out of its drawing area) .
Is it possible at all? If so how?
Thanks,
|
|
|
|
|
What parent window are you using when creating the CMembWnd? How are you creating CMembWnd in code?
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
The parent window can be either CDialog or another complex control like CGrid control. The main control is usually created dynamically. In the main control CCustWnd::OnCreate method I do the following (simplified):
m_pMemb = new CMembWnd;<br />
m_pMemb>CreateEx(WS_EX_TOOLWINDOW, "xxx", NULL, WS_CHILD | WS_BORDER | WS_VISIBLE, rcWnd, this, 0);
Thanks,
|
|
|
|
|
Is it possible to convert a string to a char?
Or is there a way to do something like this:
strcpy(char str[512], string str2); ?
Any help would be appretiated
|
|
|
|
|
string str;
_tcscpy(c,str.c_str());
suhredayan There is no spoon.
|
|
|
|
|
var.c_str()
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I want to write a MFC program that do the same thing as MATLAB imread() function. That is read in the image file, get the RGB value of each pixel.
Is there efficient library to load the image and get all the pixel values, resize the image, and convert to gray scale?
Or I can do that in MFC?
|
|
|
|
|
MSDN: HBITMAP structure and CBitmap class. (only bitmaps)
Also look on stuff like Image, jpg,... in C++ in google, MSDN, CP, ...
good luck.
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
there are many libraries to do what you need (there's even a link to one at the bottom of this message). there are some here on CodeProject, too - look in the Bitmaps and Palettes section .
Image Toolkits | Image Processing | Cleek
|
|
|
|
|
how can i get the properties of a window(not created by a user application) by using the Window Handle?
i know the Window Handle....which function to use to get the properties?
regards,
kedar.
|
|
|
|
|
It depends on what properties you're looking for
GetWindowText will give you the name in the titlebar
GetWindowRect and GetClientRect will get size
GetWindowLong can be used the see what styles the window has...
you can enumerate all the child windows with EnumChildWindows
There are lots of things you can do, so maybe you should check the msdn docs
hope this helps
Don't think you are, know you are...
|
|
|
|
|
how to send file with tcp/ip?
|
|
|
|