answersLogoWhite

0


Best Answer

Put their names into the parameter-list.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you pass structures as a parameter to the functions in c plus plus?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Which is the default parameter passing technique in c plus plus language?

The default is to pass by value.


Is it possible in C plus plus builder xe to pass objects like TSQLConnection object to a dll as a parameter if yes then how?

Pass the object by reference to a function in the DLL.


What are the different parameter passing methods used by c plus plus?

Pass by value, constant value, reference and constant reference. Pass by value is the default in C++ (pass by reference is the default in Java).


What is meant by passing function to another function in c plus plus?

Just as pointers can point to variables, pointers can also point to functions. Thus you can pass function pointers to functions. In so doing, you can alter the behaviour of the function by having it call dynamically call arbitrary functions rather than just preset functions.


Can there be friend functions in c plus plus?

Yes, there can be friend functions in C++.


What is the extraction operators in C plus plus?

This operator (>>) applied to an input stream is known as extraction operator. It performs an input operation on a stream generally involving some sort of interpretation of the data (like translating a sequence of numerical characters to a value of a given numerical type).Three groups of member functions and one group of global functions overload this "extraction operator" (>>) applied to istream objects:The first group of member functions are arithmetic extractors. These read characters from the input data, and parse them to interpret them as a value of the specific type of its parameter. The resulting value is stored in the variable passed as parameter.The streambuf version copies as many characters as possible to the stream buffer object used as right-hand parameter, either until an error happens or until there are no more characters to copy.Those in the last group of member functions have a pointer to a function as parameter. These are designed to be used with manipulator functions. Manipulator functions are functions specifically designed to be easily used with this operator.The global functions overload the operator when the parameter is either a character or a c-string, and, as expected they extract either one character or a sequence of characters from the input stream.


Why you pass arguments to function in c plus plus?

You pass arguments to functions because that is how you tell the function what you want it to do. If you had, for instance, a function that calculated the square root of something, you would pass that something as an argument, such as a = sqrt (b). In this case sqrt is the function name, b is passed as its argument, and the return value is assigned to a.


Is y equals 5x plus 1 a function?

Y = 5X + 1 Is a line and should pass the vertical line test for functions, so this is a function.


How do stuctures in C and C plus plus differ?

Structures in C and C++ differ in that C structures do not have an automatic typdef associated with them.


What is parameters in C plus plus?

In C++, parameters are variables declared in the function's declaration and definition that receive values passed in from the function call. They are used to pass values or data into a function to be used within the function's code. Parameters allow functions to be more flexible and reusable by accepting different inputs without needing to modify the function's code.


What are the three selection structures available in C plus plus?

if while switch


Can a variable name can be passed to a value parameter in c plus plus?

No. Pass by value always receives a copy of the value being passed. Even if it were possible to physically pass a user-defined identifier into a function by value, the compiled code would not recognise the name since all identifiers are stripped out by the compiler and replaced with memory addresses. Strictly speaking, even pass by reference does not pass the variable name, as the function argument is simply an alias, an alternate but informal name, for the formal name you actually pass. In essence you are passing the memory address of the variable, rather the value of the memory address as you would with pass by value.