Top "Function-definition" questions

What does -> mean in Python function definitions?

I've recently noticed something interesting when looking at Python 3.3 grammar specification: funcdef: 'def' NAME parameters ['->' test] ':…

python python-3.x annotations function-definition
is there any way for multiple where statement in Haskell

i tried to write 3-4 where statement in a one function but i get error and couldnt do it , i …

haskell syntax where-clause guard-clause function-definition
Alternative (K&R) C syntax for function declaration versus prototypes

What is useful about this C syntax — using 'K&R' style function declarations? int func (p, p2) void* p; …

c function function-declaration kernighan-and-ritchie function-definition
How to check if a char is in a string in C++?

Ok, I feel this should be extraordinarily simple, but for the life of me I can not figure it out. …

c++ string char function-definition
C++ Allocate dynamic array inside a function

so I need to allocate an array of int inside a function. The array is declared before calling the function (…

c++ vector pass-by-reference dynamic-memory-allocation function-definition
Error lnk2005 already defined in .obj

There are many question about this error. But they are related to only a single variable. test.h namespace World { …

c++ visual-studio compiler-errors namespaces function-definition
Returns in a recursive function

I am trying to understand how to use recursion in C, and I can't get how return works in it. …

c recursion return-value function-definition
Loop through array of unknown size C++

I am trying to traverse a double array of an unknown size. Why does the following not work? for (unsigned …

c++ arrays for-loop sizeof function-definition
How to pass pointer to function and dynamically allocate memory within function C++

I'm trying to declare a pointer and pass that pointer to a function where memory is allocated. Here is a …

c++ pointers pass-by-reference pass-by-value function-definition