Click here to Skip to main content
15,884,962 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Make client area of dialog transparent, so i can see what is behind the window Pin
Albert Holguin22-May-11 11:45
professionalAlbert Holguin22-May-11 11:45 
AnswerRe: Make client area of dialog transparent, so i can see what is behind the window Pin
Mark Salsbery22-May-11 12:48
Mark Salsbery22-May-11 12:48 
AnswerRe: Make client area of dialog transparent, so i can see what is behind the window Pin
abhishek.biradar22-May-11 21:53
abhishek.biradar22-May-11 21:53 
AnswerRe: Make client area of dialog transparent, so i can see what is behind the window Pin
Iain Clarke, Warrior Programmer23-May-11 7:00
Iain Clarke, Warrior Programmer23-May-11 7:00 
GeneralRe: Make client area of dialog transparent, so i can see what is behind the window Pin
manchukuo23-May-11 7:11
manchukuo23-May-11 7:11 
GeneralRe: Make client area of dialog transparent, so i can see what is behind the window Pin
Iain Clarke, Warrior Programmer23-May-11 8:02
Iain Clarke, Warrior Programmer23-May-11 8:02 
QuestionKERNELBASE Exception Pin
Joschwenk66622-May-11 9:20
Joschwenk66622-May-11 9:20 
QuestionC++ variable arguments Pin
Sintax122-May-11 5:50
Sintax122-May-11 5:50 
I was making exercise 4.23 from C++ essentials and ended up with this code:

#include <iostream>
#include <stdarg.h>
using namespace std;

double Sum (int n, double val ...)
{
	va_list args;

	double	value = val;

	double result = 0;
	va_start(args, val);
	
	for(int i=0;i<n;i++)
	{ 
		result+= value;
		va_arg(args, double);
	}

	va_end(args);

	return result;
}

int main()
{
	double n = Sum(3, 2, 2, 2);
	cout << "Result: " << n;

	return 0;
}


It compiles fine and when i do the call "Sum(3, 2, 2, 2)" it just prints "Result: 6" but when i call "Sum(3, 2.1, 2.0, 2.0)" it prints "Result: 6.3" while it should print 6.1, right? What am i doing wrong? D: thanks! btw, the solutions the book provides aren't working...
AnswerRe: C++ variable arguments Pin
Luc Pattyn22-May-11 6:02
sitebuilderLuc Pattyn22-May-11 6:02 
GeneralRe: C++ variable arguments Pin
Sintax122-May-11 7:10
Sintax122-May-11 7:10 
GeneralRe: C++ variable arguments Pin
Luc Pattyn22-May-11 7:31
sitebuilderLuc Pattyn22-May-11 7:31 
AnswerRe: C++ variable arguments Pin
Stefan_Lang23-May-11 2:19
Stefan_Lang23-May-11 2:19 
QuestionMultiple threading Pin
includeh1022-May-11 5:07
includeh1022-May-11 5:07 
AnswerRe: Multiple threading Pin
Mark Salsbery22-May-11 5:27
Mark Salsbery22-May-11 5:27 
AnswerRe: Multiple threading Pin
Luc Pattyn22-May-11 6:06
sitebuilderLuc Pattyn22-May-11 6:06 
QuestionCDC::DrawText Not doing as it's told Pin
softwaremonkey22-May-11 1:40
softwaremonkey22-May-11 1:40 
AnswerRe: CDC::DrawText Not doing as it's told Pin
Richard MacCutchan22-May-11 3:34
mveRichard MacCutchan22-May-11 3:34 
AnswerRe: CDC::DrawText Not doing as it's told Pin
Mark Salsbery22-May-11 3:54
Mark Salsbery22-May-11 3:54 
GeneralRe: CDC::DrawText Not doing as it's told Pin
softwaremonkey22-May-11 4:59
softwaremonkey22-May-11 4:59 
Questionhow to create chm file Pin
MKC00221-May-11 21:30
MKC00221-May-11 21:30 
AnswerRe: how to create chm file Pin
Richard MacCutchan22-May-11 1:36
mveRichard MacCutchan22-May-11 1:36 
AnswerRe: how to create chm file Pin
Hans Dietrich23-May-11 3:55
mentorHans Dietrich23-May-11 3:55 
AnswerRe: how to create chm file Pin
JohnStein6329-May-11 9:37
JohnStein6329-May-11 9:37 
QuestionArray Count Pin
AmbiguousName21-May-11 10:49
AmbiguousName21-May-11 10:49 
AnswerRe: Array Count Pin
Code-o-mat21-May-11 11:17
Code-o-mat21-May-11 11:17 

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.