Click here to Skip to main content
15,919,749 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Need help. How to get frames from link-layer in Windows XP Pin
geo_m16-Jan-05 21:08
geo_m16-Jan-05 21:08 
GeneralRe: Need help. How to get frames from link-layer in Windows XP Pin
Chuaaico16-Jan-05 22:43
Chuaaico16-Jan-05 22:43 
GeneralRe: Need help. How to get frames from link-layer in Windows XP Pin
geo_m17-Jan-05 0:19
geo_m17-Jan-05 0:19 
GeneralRe: Need help. How to get frames from link-layer in Windows XP Pin
Chuaaico26-Jan-05 0:48
Chuaaico26-Jan-05 0:48 
GeneralRe: Need help. How to get frames from link-layer in Windows XP Pin
geo_m26-Jan-05 1:04
geo_m26-Jan-05 1:04 
GeneralRe: Need help. How to get frames from link-layer in Windows XP Pin
Chuaaico26-Jan-05 15:21
Chuaaico26-Jan-05 15:21 
GeneralRe: Need help. How to get frames from link-layer in Windows XP Pin
geo_m26-Jan-05 20:05
geo_m26-Jan-05 20:05 
Generalbeginner question Pin
Anonymous16-Jan-05 14:44
Anonymous16-Jan-05 14:44 
This is part of an assignment to make a cash register-like program. This function works counting the change to be returned, except the pennies. I can't figure out why the assignment to the penny (global) variable isn't working. Any idea's?

// function to make change<br />
void makeChange(double cost, double payed) {<br />
	double difference;<br />
	<br />
	difference = payed - cost;<br />
<br />
	twenty = (int) difference / 20;<br />
	difference = difference - (twenty * 20);<br />
<br />
	ten = (int) difference / 10;<br />
	difference = difference - (ten * 10);<br />
<br />
	five = (int) difference / 5;<br />
	difference = difference - (five * 5);<br />
<br />
	one = (int) difference;<br />
	difference = difference - one;<br />
<br />
	quarter = ((int) (difference * 100)) / 25;<br />
	difference = difference - (quarter * .25);<br />
<br />
	dime = ((int) (difference * 100)) / 10;<br />
	difference = difference - (dime * .1);<br />
<br />
	nickel = ((int) (difference * 100)) / 5;<br />
	difference = difference - (nickel * .05);<br />
<br />
// -------------------- Fix Me! ----------------------------------------------------<br />
cout << endl << "Difference before penny: " << difference << endl;<br />
cout << "Value of penny before: " << penny << endl;<br />
cout << "> penny = (int) (difference * 100); // Why isn't this line working?" << endl;<br />
cout << "> difference = difference - (penny * .01); // This \"should\" be 0 now." << endl;<br />
<br />
	penny = (int) (difference * 100); // Why isn't this line working?<br />
	difference = difference - (penny * .01); // This "should" be 0 now.<br />
<br />
cout << "Value of penny after: " << penny << endl;<br />
cout << "Difference after penny: " << difference << endl << endl;<br />
cout << "Flushing cout: " << cout.flush << " <-- Does this matter?" << endl << endl;<br />
// ---------------------------------------------------------------------------------<br />
}

GeneralRe: beginner question Pin
David Crow17-Jan-05 4:21
David Crow17-Jan-05 4:21 
GeneralRe: beginner question Pin
Adam Fowler17-Jan-05 5:31
Adam Fowler17-Jan-05 5:31 
GeneralRe: beginner question Pin
David Crow17-Jan-05 6:00
David Crow17-Jan-05 6:00 
GeneralRe: beginner question Pin
Adam Fowler17-Jan-05 6:12
Adam Fowler17-Jan-05 6:12 
GeneralRe: beginner question Pin
David Crow17-Jan-05 6:28
David Crow17-Jan-05 6:28 
GeneralRe: beginner question Pin
Adam Fowler17-Jan-05 6:43
Adam Fowler17-Jan-05 6:43 
QuestionWhy .net create new project error? Pin
willyfu16-Jan-05 14:40
willyfu16-Jan-05 14:40 
QuestionModeless dialog receiving unwanted messages? Pin
Cpt Rick16-Jan-05 14:11
Cpt Rick16-Jan-05 14:11 
QuestionControl Messages and Direct/Indirect Parent Window? Pin
Maverick16-Jan-05 13:37
Maverick16-Jan-05 13:37 
GeneralCListCtrl ItemSelected Notification... Pin
Maverick16-Jan-05 13:23
Maverick16-Jan-05 13:23 
GeneralRe: CListCtrl ItemSelected Notification... Pin
PJ Arends16-Jan-05 13:47
professionalPJ Arends16-Jan-05 13:47 
GeneralDifference between SBP_LOWERTRACKHORZ and SBP_UPPERTRACKHORZ Pin
Luis Mejia16-Jan-05 12:24
Luis Mejia16-Jan-05 12:24 
GeneralIcon Serialization Pin
smcd16-Jan-05 9:47
smcd16-Jan-05 9:47 
QuestionHow to write an IDE Context Manager Pin
fabiocannizzo16-Jan-05 7:36
fabiocannizzo16-Jan-05 7:36 
AnswerRe: How to write an IDE Context Manager Pin
Roger Allen16-Jan-05 23:27
Roger Allen16-Jan-05 23:27 
GeneralRe: How to write an IDE Context Manager Pin
Anonymous17-Jan-05 5:57
Anonymous17-Jan-05 5:57 
GeneralMoving the caret in a CRichEditCtrl Pin
dlarkin7716-Jan-05 5:22
dlarkin7716-Jan-05 5:22 

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.