Questions tagged [function-calls]

Function (or method) calling is the act of using a function or a method.

Functions (or methods) are blocks of code.
They are there, ready to perform some action (a sequence of instructions, including the possibility of calling other functions - even themselves, which is called recursion).
If nobody calls them, the are useless (dead code).

351 questions
-3
votes
1 answer

How 'heavy' are the following statements?

So lately I've been trying to figure out how 'heavy' some statements are. For example is it a good thing to check for every possible exception with if statements or will that slow down the programm considerably? So I bassically want to know how…
Roan
  • 1,200
  • 2
  • 19
  • 32
-3
votes
2 answers

undefined reference to static method error

I am having an issue with my function call static classname *makeclass ( char ch, int x1, int y1, int x2, int y2){ cin >> ch >> x1 >> y1 >> x2 >> y2; Ship **ptr = 0; if ( ch != 'A' || ch != 'B' || ch != 'C' || ch != 'D'){ …
-3
votes
2 answers

char pointer parameter different behaviour

I have the following code: void uppercase(char *sir) { for(int i=0;i
dragosb
  • 607
  • 8
  • 25
-4
votes
1 answer

Is it a considered a recursive function if I have an overloaded function that calls one of its other instances?

This is hypothetical, but I have a class with two, overloaded constructors - none of which are the default constructors. If I were to call one constructor from the other, would it be recursive? Example: class Example { Example(const int…
Hayden
  • 41
  • 7
-4
votes
1 answer

Beginner's query about C program Function Call stack, sequence point(sequencing)

The code below displays different results when compiled and run on Code::Blocks. void sum(int a,int b){ printf("a=%d b=%d\n",a,b); } int main(){ int i=1; sum(i=5,++i); printf("i=%d\n\n",i); /***********************/ i=2; …
-5
votes
3 answers

Too many arguments to function call, What do I do?

I am working on a problem in my textbook and I need to make a triangle angle calculator Im used to java but Im not 100% on C yet, I don't understand the logic in it. #include static float angleB; static float angleA; float…
1 2 3
23
24