Jump to content

  • Log In with Google      Sign In   
  • Create Account


indelvarn

Member Since 14 Dec 2012
Offline Last Active Dec 14 2012 07:04 AM
-----

Topics I've Started

c++ error C4700: uninitialized local variable 'num1' used

14 December 2012 - 01:45 AM

can anyone tell me what's the problem here?

c++ error C4700: uninitialized local variable 'num1' used

#include "stdafx.h"
#include <stdio.h>
int main()
{
int num1 = 1;
int num2 = 2;
while (num1 < 101)
{
printf("%d\n",num1);
printf("%d\n",num2);
int num1 = num1 + num2;
int num2 = num1 + 1 + num2;
}
}

PARTNERS