Home » U++ Library support » U++ Core » Cannot use Format for unsigned int
Cannot use Format for unsigned int [message #47946] |
Wed, 26 April 2017 07:18 |
|
deep
Messages: 263 Registered: July 2011 Location: Bangalore
|
Experienced Member |
|
|
Hi
Using Win10, MSC15
UPP10943
#include <Core/Core.h>
using namespace Upp;
CONSOLE_APP_MAIN
{
int n;
unsigned int un;
String s;
n = 1212;
un = 0x05060708 ;
DUMP(n);
DUMP(un);
s << Format("%08X" , n) << "\n";
s << Format("%08X" , un) ;
DUMP(s);
}
I get compile time error
'Upp::Format': none of the 45 overloads could convert all the argument types
for unsigned int variable un
TestFormat.cpp(18): error C2665: 'Upp::Format': none of the 45 overloads could convert all the argument types
\upp\uppsrc\core\Format.h(111): note: could be 'Upp::String Upp::Format(const char *,const Upp::Vector<Upp::Value> &)'
\upp\uppsrc\core\Format.h(106): note: or 'Upp::String Upp::Format(const char *,const Upp::Value &)'
\upp\uppsrc\core\TimeDate.h(154): note: or 'Upp::String Upp::Format(Upp::Time,bool)'
\upp\MyApps\TestFormat\TestFormat.cpp(18): note: while trying to match the argument list '(const char [5], unsigned int)'
TestFormat: 1 file(s) built in (0:04.82), 4828 msecs / file, duration = 4844 msecs, parallelization 0%
MinGW error
error: conversion from 'unsigned int' to 'const Upp::Value' is ambiguous
s << Format("%08X" , un) ;
Warm Regards
Deepak
|
|
|
Goto Forum:
Current Time: Sat May 11 15:39:47 CEST 2024
Total time taken to generate the page: 0.02780 seconds
|