Wiki source for CConst
=====Const=====
==a==Konstante Variable==a==
%%(c)
const int * x;
%%
==a==Konstante Pointer==a==
%%(c)
int * const x;
%%
==a==Verwenung von const in Funktionen==a==
%%(c)
int berechne(const int a)
{
return (a*5 - 3);
};
%%
Effekt:
~-Der Compiler kann aufgrund dieser Information ggf. besser optimieren! Gehen sie großzügig damit um.
Voraussetzung:
~-Sie wollen die Variable nicht innerhalb der Funktion ändern
----
Siehe auch {{backlinks}}
==a==Konstante Variable==a==
%%(c)
const int * x;
%%
==a==Konstante Pointer==a==
%%(c)
int * const x;
%%
==a==Verwenung von const in Funktionen==a==
%%(c)
int berechne(const int a)
{
return (a*5 - 3);
};
%%
Effekt:
~-Der Compiler kann aufgrund dieser Information ggf. besser optimieren! Gehen sie großzügig damit um.
Voraussetzung:
~-Sie wollen die Variable nicht innerhalb der Funktion ändern
----
Siehe auch {{backlinks}}