Compile C++ using cmd

I can compile following code using "cl A.cpp" but i want to compile with an input file A.in and generate output file A.out.. is there any why to do that from cmd....

A.cpp
1
2
3
4
5
6
7
8
9
10
#include<stdio.h>

int main(){
	int n;
	while( scanf("%d", &n) ){
		if( !n )break;
		printf("%d\n", n);
	}
	return 0;
}


A.in
1
2
3
4
5
1
2
3
4
5
Topic archived. No new replies allowed.