[Home]  [Edit this page]  [Recent Changes]  [Special Pages]  [Help
CMemmove » quantization » AdvancedTopics » Pascal2Delphi » Curl Content Language » CSharpGlossary » variable » CppClxGlossary » QbasicFAQ_OtherCompilers » WhatLinksHere » CDefinition

(C) Definition

Specifying the value of a  ?variable or specifying the body of a function.

Variable definition

Setting the value of a variable:

const int value = 3;


Opposite of a declaration:
  int declaredValue; //Just a declaration, can be any value


Variables need to be defined first at the top of every function using them.

Function definition

Specifying the internals of a function, instead of declaring the function's arguments and return type. Function definitions are mostly found in .c files.

/* TODO: Make C example
double calculateSum(const std::vector<double>& myVector)
{
  double sum = 0.0;
  const int size = myVector.size();
  for (int i=0; i!=size; ++i)
  {
    sum+=myVector[i];
  }
  return sum;
}
  • /


'Definition' links



last edited (December 6, 2006) by bilderbikkel, Number of views: 1913, Current Rev: 1

[Edit this page]  [Page history]  [What links here]  [Discuss this topic]  [Printer Friendly]  

Members

Username:

Password:


Register
Forgot Password?




Programmers Heaven - for .NET, Java, C/C++ and WEB Developers!
© 1996-2008 Community Networks Ltd. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited. Violators of this policy may be subject to legal action. Please read Terms Of Use and Privacy Statement for more information. Site Management by Lars Hagelin at Kontantkort.se.