View Single Post
  #1 (permalink)  
Old September 15th, 2006, 04:52 AM
vincentaries vincentaries is offline
Registered User
 
Join Date: Sep 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default i want ur help! thanx!

i'm a beginner in c field, and i meet a problem i can't understand why and how to occur that.
my code as follow:
#include <iostream.h>
#include <stdio.h>
void main()
{
 int a;
 scanf("%d\n", &a);
 printf("wut u get from the console is: %d", a);
}

when i add '\n' in scanf function as you see before, it can't work as i hope. why? and how? thanx!



Reply With Quote