Click here to Skip to main content
15,916,463 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Print preview Pin
Christian Graus25-Jun-01 23:13
protectorChristian Graus25-Jun-01 23:13 
GeneralQuestion about the file of VC Project Pin
24-Jun-01 20:26
suss24-Jun-01 20:26 
GeneralRe: Question about the file of VC Project Pin
Michael Dunn24-Jun-01 21:28
sitebuilderMichael Dunn24-Jun-01 21:28 
GeneralProblem of Print Mechanism! Pin
24-Jun-01 19:54
suss24-Jun-01 19:54 
GeneralSimple program Pin
Thiago Jackiw24-Jun-01 19:33
Thiago Jackiw24-Jun-01 19:33 
GeneralRe: Simple program Pin
Christian Graus24-Jun-01 19:37
protectorChristian Graus24-Jun-01 19:37 
GeneralBeginner's Question II Pin
Jason K. Dove24-Jun-01 18:57
Jason K. Dove24-Jun-01 18:57 
GeneralRe: Beginner's Question II Pin
Christian Graus24-Jun-01 19:03
protectorChristian Graus24-Jun-01 19:03 
greatestCommonDenominator()
{
int gcd, same, hold1, hold2;

if(iNumerator < iDenominator){
for(gcd=1;gcd hold1 = iDenominator / gcd;
^^^^^^^^^^ what's up with this ? Is a bit missing in the middle ? This won't compile because the for loop has no closing bracket. Does the for loop have a ; at the end of it ? If so, it won't work either.
Also, if you want the for loop to take into account more than one line, they need to also be enclosed in {}.

hold2 = iNumerator / gcd;
if(hold1 == hold2)
same = hold1;
}

Here is a gcd function

int gcd(int m, int n)
{
if (m==0) return n;
else return gcd( n%m, m);
}



Christian

#include "std_disclaimer.h"

People who love sausage and respect the law should never watch either one being made.

The things that come to those who wait are usually the things left by those who got there first.
GeneralRe: Beginner's Question II Pin
markkuk24-Jun-01 20:40
markkuk24-Jun-01 20:40 
GeneralRe: Beginner's Question II Pin
Michael Dunn24-Jun-01 21:37
sitebuilderMichael Dunn24-Jun-01 21:37 
GeneralRe: Beginner's Question II Pin
Rejeesh25-Jun-01 1:28
Rejeesh25-Jun-01 1:28 
GeneralFlash activeX Pin
24-Jun-01 18:04
suss24-Jun-01 18:04 
GeneralBeginner's Question Pin
Jason K. Dove24-Jun-01 17:35
Jason K. Dove24-Jun-01 17:35 
GeneralRe: Beginner's Question Pin
Rejeesh24-Jun-01 18:23
Rejeesh24-Jun-01 18:23 
GeneralRe: Beginner's Question Pin
Rejeesh25-Jun-01 1:26
Rejeesh25-Jun-01 1:26 
QuestionHow do I get an application's .exe name Pin
Jennifer Pinkton24-Jun-01 17:21
Jennifer Pinkton24-Jun-01 17:21 
AnswerRe: How do I get an application's .exe name Pin
Blake Miller25-Jan-05 7:13
Blake Miller25-Jan-05 7:13 
GeneralTrayIcon problems....¤Ì.¤Ì Pin
hahyojin24-Jun-01 15:30
hahyojin24-Jun-01 15:30 
GeneralON_UPDATE_COMMAND_UI does not work in Dialog Pin
24-Jun-01 12:04
suss24-Jun-01 12:04 
GeneralRe: ON_UPDATE_COMMAND_UI does not work in Dialog Pin
Christian Graus24-Jun-01 13:52
protectorChristian Graus24-Jun-01 13:52 
GeneralRe: ON_UPDATE_COMMAND_UI does not work in Dialog Pin
Brendan Tregear24-Jun-01 13:58
Brendan Tregear24-Jun-01 13:58 
GeneralHelp with getting a HMENU for the Right-Click Context Menu Pin
JavaTony24-Jun-01 11:49
JavaTony24-Jun-01 11:49 
GeneralHelp with capturing Full-screen DOS to a bitmap file Pin
JavaTony24-Jun-01 11:33
JavaTony24-Jun-01 11:33 
GeneralHelp with using InvalidateRect API function to update only part of the screen Pin
JavaTony24-Jun-01 11:16
JavaTony24-Jun-01 11:16 
GeneralRe: Help with using InvalidateRect API function to update only part of the screen Pin
Tim Deveaux24-Jun-01 13:08
Tim Deveaux24-Jun-01 13:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.