#include <vector>
#include <stdio.h>
using namespace std;
void MyFunction(int* val) {
printf("%d\n", *val);
}
int main()
{
vector<int> myVec;
myVec.push_back(1);
MyFunction(myVec.begin());
return 0;
}
컴파일 하면 아래와 같은 에러가 납니다.
main.cpp: In function `int main()':
main.cpp:18: error: cannot convert `__gnu_cxx::__normal_iterator<int*,
std::vector<int, std::allocator<int> > >' to `int*' for argument `1' to `
형변환 문제인거 같은데요.. 윈도우, 레드헷에서는 문제가 없었습니다.