Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7128269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T11:07:16+00:00 2026-05-28T11:07:16+00:00

Using VS2008, why is this OK (not allowed to use 2010). void assert(int exp,

  • 0

Using VS2008, why is this OK (not allowed to use 2010).

void assert(int exp, int actual) {if (exp!=actual) printf("assert failed\n");}
void assert(unsigned int exp, unsigned int actual) {if (exp!=actual) printf("assert    failed\n");}

But this is ambiguous.

void assert(__int64 exp, __int64 actual) {if (exp!=actual) printf("assert failed\n");}
void assert(unsigned __int64 exp, unsigned __int64 actual) {if (exp!=actual) printf("assert failed\n");}

Sample error text

d:\my documents\visual studio 2008\projects\classtest\classtest\classtest.cpp(31) : error C2668: 'assert' : ambiguous call to overloaded function
d:\my documents\visual studio 2008\projects\classtest\classtest\classtest.cpp(12): could be 'void assert(unsigned __int64,unsigned __int64)'
d:\my documents\visual studio 2008\projects\classtest\classtest\classtest.cpp(10): or       'void assert(__int64,__int64)'
while trying to match the argument list '(int, int)'

It only gets ambiguous with regards to the ‘unsigned’ overload. Having and “int” version and an “__int64” version is not ambiguous.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T11:07:16+00:00Added an answer on May 28, 2026 at 11:07 am

    Your code is actually using int and int as the parameters. In the first case it has an exact match. In the second case it does not, and it treats int->uint64 and int->int64 as equally valid conversions so it doesn’t know which one to pick.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i wrote this simple programme which did not pass the compiling phase using vs2008
I am building a Setup Package using VS2008. This is a regular setup package
I'm having some problems with a datagridview element I'm using in VS2008. This DataGridView
I am using StyleCop in VS2008. I get this error: SA1638: The file attribute
Using VS2008 and ASP.NET 3.5 (or VS 2010 / .NET 4.0?), how can I
I'm using VS2008 to build a plain old C++ program (not C++/CLI). I have
Using VS2008, and Telerik radGrid version 2010.1.519.35 I have a about 50 DNN modules
Iam trying to compile rtmpd using VS2008 Iam getting this error. Error 63 error
I have an .MSI file created using VS2008. This .MSI is composed of a
Using vs2008 .NET 3.5 SP1 I am trying to use an ActiveX dll in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.