Finding encoded names

I'm supposed to find the encoded names that will be generated by the compiler for the file. The problem is that I have no idea how i'm supposed to do that. I'm using Visual Studios 2013. Can someone please tell me how i'm supposed to fine the encoded names

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
  // array5.cpp - friend function
// This program will compile, but it won't link without the set() definition

#include <iostream>

using namespace std;

#define SIZE 10

class intArray {
private:
	int a[SIZE];
public:
	void setVal(int index, int value);
	friend void print(intArray);
};

void print(intArray x) {
	int i;
	for (i = 0; i < SIZE; i++)
		cout << "a[" << i << "] = " << x.a[i] << endl;
}

int main() {
	intArray num;
	int i;

	for (i = 0; i < SIZE; i++)
		num.setVal(i, i);
	print(num);
	return 0;
}
Last edited on
Perhaps the easiest way is to generate an assembly listing and inspect that to determine the mangled names.

http://stackoverflow.com/a/1020515/1708463
Topic archived. No new replies allowed.