-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
38 lines (31 loc) · 1009 Bytes
/
main.cpp
File metadata and controls
38 lines (31 loc) · 1009 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include <iostream>
using namespace std;
extern "C" {
int ProcC_CallWithParameterList(int, int);
int ProcC_CallWithStackFrame(int, int);
int __stdcall ProcSTD_CallWithParamterList(int, int);
int __stdcall ProcSTD_CallWithStackFrame(int, int);
}
extern "C" {
int ReadFromConsole(unsigned char);
void DisplayToConsole(char *, int);
void DoSubtraction();
}
int ReadFromConsole(unsigned char by){
cout << "Enter " << by << ": ";
int i;
cin >> i;
return i;
}
void DisplayToConsole(char* x, int n)
{
cout << x << n << endl << endl;
}
int main(){
DoSubtraction();
cout << "C-Call With Paramters : 10-3 = " << ProcC_CallWithParameterList(10, 3) << endl;
cout << "C-Call With Stack Frame : 10-3 = " << ProcC_CallWithStackFrame(10, 3) << endl;
cout << "STD-Call With Paramters : 10-3 = " << ProcSTD_CallWithParamterList(10,3) << endl;
cout << "STD-Call With Stack Frame : 10-3 = " << ProcSTD_CallWithStackFrame(10,3) << endl;
system("pause");
}