[Solved] How to call a function in C++

I don´t know if it could be for not having a “main” function Well, yes, that’s kind of a problem. Each program must have a main() function. Where else would the execution start from? how can i call the function “RegistrarUnaInclusion” to make it work? RegistrarUnaInclusion is a member function of class ListaCircular. Therefore, you … Read more

[Solved] How to read a file word by word? [closed]

Within your while loop instead of immediately printing the character that you read, store the char in a char array. Add an if statement that does a comparison that checks if the read char is a space character. If it is you should print the stored array and set the index of the array back … Read more

[Solved] C++ Functions run no matter input

Your if statements have more entries then a teenage girls phone. 🙂 You should invest in some structures, containers and loops. For example: const static std::string question_words[] = {“am”, “are”, “can”, “did”, “could”, “do”, “does”}; const static unsigned int word_quantity = sizeof(question_words) / sizeof(question_words[0]); //… bool is_question = false; for (unsigned int i = 0; … Read more

[Solved] array inside function

#include<stdio.h> #define MAX_SIZE_ALLOTED_TO_EACH_QUESTION 100 #define NUMBER_OF_QUESTIONS 10 int scoreList[NUMBER_OF_QUESTIONS]; // This array will contain the individual score for each answers to respective questions int i; void Extroversion(int scoreList[]){ // Let formula for this be E = 20 +(1)___-(3)___+(2)___-(4)___ int E = 20 + (scoreList[1] + scoreList[2]) – (scoreList[3] + scoreList[4]); printf(“\nExtroversion is the personality trait … Read more

[Solved] How function is getting called without defining in python [closed]

Make sure your code is exactly as it is now in the question (including the edit by @Haidro) The code, as you pasted it in the question, suggests your indentation was something like this: def my_function(): ”’ docstring ”’ code_intended_for_my_function() #my_function() This would cause code_intended_for_my_function to be executed. This is “valid” because the docstring makes … Read more

[Solved] what is the order of execution if I put a statement after the statement that do the recursion inside the function

okay it’s really simple. Just consider these two points before moving on: point 1: When a function calls another function, the first function that calls the other is known as the “caller” function, the function getting called is known as the “callee”. point 2: when a callee is called, code execution stops at the point … Read more