Click here to Skip to main content
15,902,939 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Multi Threaded debug question Pin
Saurabh.Garg18-Sep-08 15:03
Saurabh.Garg18-Sep-08 15:03 
QuestionVisual Studio 6 - helpful debugger? Pin
charlieg18-Sep-08 12:18
charlieg18-Sep-08 12:18 
AnswerRe: Visual Studio 6 - helpful debugger? Pin
Mark Salsbery19-Sep-08 6:49
Mark Salsbery19-Sep-08 6:49 
GeneralRe: Visual Studio 6 - helpful debugger? Pin
charlieg21-Sep-08 2:54
charlieg21-Sep-08 2:54 
Questionatof() in Visual Studio 6 vs 2005 Pin
FoxholeWilly18-Sep-08 10:38
FoxholeWilly18-Sep-08 10:38 
AnswerRe: atof() in Visual Studio 6 vs 2005 Pin
Mark Salsbery18-Sep-08 10:48
Mark Salsbery18-Sep-08 10:48 
GeneralRe: atof() in Visual Studio 6 vs 2005 Pin
FoxholeWilly18-Sep-08 12:16
FoxholeWilly18-Sep-08 12:16 
GeneralRe: atof() in Visual Studio 6 vs 2005 Pin
Mark Salsbery19-Sep-08 5:03
Mark Salsbery19-Sep-08 5:03 
FoxholeWilly wrote:
Compiler did not like TCHAR


#include <tchar.h>


FoxholeWilly wrote:
When looking at atof() and _wtof() in the watch window, the results are both 409600.0000

The double variables both show 101523136.00000000 in the watch window.



That doesn't make sense. How do you watch the functions?

I fired up VS 2005 and wrote this:
#ifndef _WIN32_WINNT 
#define _WIN32_WINNT 0x0501
#endif						

#include <stdio.h>
#include <tchar.h>
#include <math.h>
#include <stdlib.h>


int _tmain(int argc, _TCHAR* argv[])
{
	// Non-Unicode
	char charbuffer[] = "409600.0000";
	double doublefromchar = atof(charbuffer);

	// Unicode
	wchar_t wcharbuffer[] = L"409600.0000";
	double doublefromwchar = _wtof(wcharbuffer);

	// Generic text
	TCHAR tcharbuffer[] = _T("409600.0000");
	double doublefromtchar = _tstof(tcharbuffer);

	return 0;
}

I can't reproduce anything you are seeing...you've got something
else going on you're not showing us.


Mark

Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

AnswerRe: atof() in Visual Studio 6 vs 2005 Pin
CPallini18-Sep-08 11:31
mveCPallini18-Sep-08 11:31 
GeneralRe: atof() in Visual Studio 6 vs 2005 Pin
FoxholeWilly18-Sep-08 12:22
FoxholeWilly18-Sep-08 12:22 
QuestionRe: atof() in Visual Studio 6 vs 2005 Pin
CPallini18-Sep-08 22:18
mveCPallini18-Sep-08 22:18 
AnswerRe: atof() in Visual Studio 6 vs 2005 Pin
Mark Salsbery19-Sep-08 4:46
Mark Salsbery19-Sep-08 4:46 
AnswerRe: atof() in Visual Studio 6 vs 2005 Pin
FoxholeWilly22-Sep-08 5:27
FoxholeWilly22-Sep-08 5:27 
Questionunordered_set Pin
steph518-Sep-08 9:23
steph518-Sep-08 9:23 
AnswerRe: unordered_set Pin
Randor 18-Sep-08 10:04
professional Randor 18-Sep-08 10:04 
Question<unordered_set></unordered_set> Pin
steph518-Sep-08 8:37
steph518-Sep-08 8:37 
AnswerRe: Pin
Mark Salsbery18-Sep-08 8:42
Mark Salsbery18-Sep-08 8:42 
GeneralRe: Pin
steph518-Sep-08 9:13
steph518-Sep-08 9:13 
GeneralRe: Pin
Mark Salsbery18-Sep-08 9:30
Mark Salsbery18-Sep-08 9:30 
GeneralRe: Pin
steph518-Sep-08 9:39
steph518-Sep-08 9:39 
JokeRe: Pin
Rajesh R Subramanian18-Sep-08 21:56
professionalRajesh R Subramanian18-Sep-08 21:56 
GeneralRe: Pin
Mark Salsbery19-Sep-08 5:09
Mark Salsbery19-Sep-08 5:09 
AnswerHow about a subject line? Pin
Paul Conrad18-Sep-08 10:22
professionalPaul Conrad18-Sep-08 10:22 
GeneralRe: How about a subject line? Pin
Bram van Kampen18-Sep-08 14:14
Bram van Kampen18-Sep-08 14:14 
GeneralRe: How about a subject line? Pin
Paul Conrad18-Sep-08 14:53
professionalPaul Conrad18-Sep-08 14:53 

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.