im brushing over some of my notes for a midterm tommorow.
questions i have when i was reading:
what exactly does a parameter do?
i know it passes a value to a function-but how is it always like that? or is it more complicated than that? is it kind of like passing a power in math?
for the functions should the declarations go in the very top-or in its respective function?
like:
double funct1(); //function protoype, is double ok to use? since i cant use void? (need //return)
#include <iostream>
using namespace std;
int main()
{
double funct1();
return 0;
}
//function
double funct1()
{
int x = 1, y = 2; //declare here or at top in main? note: no GLOBAL const allowed!
cout << "Answer: " << x + y << endl;
return ? //<---dont know what to return here.
}
what does it mean to pass by value or pass by ref? wats the diff?
wat are the basics of an array?
2d array?
and wat is a structure?
guys-im reading my book but i feel like im reading something foreign! :(
it doesnt make sense for me! help me in simple english please!!
ur help will be GREATLY appreciated!!
(ok-back to studying :D