Jun 12, 2014 at 3:27pm UTC
I am dealing with a code with templates, and it gave me this error:
"
In member function `no<I>* Abmais<S, I>::deletarValor(int, int, no<I>*, no<I>*, I, void*) [with S = std::string, I = int]':
instantiated from `no<I>* Abmais<S, I>::deletar(int, int, no<I>*, I, S) [with S = std::string, I = int]'
instantiated from here "
Can you guys tell me what does this error means and what to lookup first to resolve this?
thanks
Jun 12, 2014 at 3:42pm UTC
This is only part of the error message. It tells you where the error occur but you have left out the part that says what the error is.
Last edited on Jun 12, 2014 at 3:42pm UTC
Jun 12, 2014 at 4:06pm UTC
"
In member function `no<I>* Abmais<S, I>::deletarValor(int, int, no<I>*, no<I>*, I, void*) [with S = std::string, I = int]':
instantiated from `no<I>* Abmais<S, I>::deletar(int, int, no<I>*, I, S) [with S = std::string, I = int]'
instantiated from here "
[Warning] converting to `int' from `double'
[Warning] converting to `int' from `double'
In member function int Abmais<S, I>::fazSplit(int) [with S = std::string, I = int]':
instantiated from `no<I>* Abmais<S, I>::inserirAposSplit(int, int, no<I>*, no<I>*, I, registo<S, I>*) [with S = std::string, I = int]'
instantiated from `no<I>* Abmais<S, I>::inserir(int, int, no<I>*, I, S, S, I, I, I) [with S = std::string, I = int]'
instantiated from here
[Warning] converting to `int' from `double'
these are all the errors that I get , and I just get this, nothing more
Jun 12, 2014 at 4:39pm UTC
Those aren't errors, they're warnings. Although you should pay attention to them and fix them anyway.
[Warning] converting to `int' from `double'
Somewhere in your code, you're doing just that - converting implicitly to an int from a double.
Last edited on Jun 12, 2014 at 4:39pm UTC
Jun 12, 2014 at 6:04pm UTC
But with these warnings I still cant run my code , why is that?
I know that with warnings you can run without problems.
Jun 13, 2014 at 9:32am UTC
Fix this warning, and rebuild. Then tell us what errors you get.
Jun 13, 2014 at 12:58pm UTC
> I still cant run my code , why is that?
Not exhaustive:
- Your program did not build correctly, there were error messages that you just decided to ignore
- You don't have execution permission. By instance, because the unit is mounted as noexec
- You did not write the correct command for the execution (e.g. ./a.out )
- Your program did run, but you didn't notice.
Apart from the last, the other would give you a message that tells you why you can't run your program