[ create a new paste ] login | about

Link: http://codepad.org/XZikftyY    [ raw code | output | fork ]

C++, pasted on Nov 5:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
struct Type1 {};
struct Type2 {};

class MyClass {
    public:
        Type1 RunAlgo();
    private:
        Type2 Run();
};

Type1 MyClass::RunAlgo() {
    //additional code
    return Run();
}


Output:
1
2
3
t.cpp: In member function 'Type1 MyClass::RunAlgo()':
Line 13: error: conversion from 'Type2' to non-scalar type 'Type1' requested
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: