代码搜索:increment
找到约 5,376 项符合「increment」的源代码
代码结果 5,376
www.eeworm.com/read/208576/15243789
cpp increment.cpp
// Fig. 10.5: Increment.cpp
// Member-function definitions for class Increment demonstrate using a
// member initializer to initialize a constant of a built-in data type.
#include
usin
www.eeworm.com/read/208576/15243790
h increment.h
// Fig. 10.4: Increment.h
// Definition of class Increment.
#ifndef INCREMENT_H
#define INCREMENT_H
class Increment
{
public:
Increment( int c = 0, int i = 1 ); // default constructor
www.eeworm.com/read/208576/15243794
cpp increment.cpp
// Fig. 10.8: Increment.cpp
// Attempting to initialize a constant of
// a built-in data type with an assignment.
#include
using std::cout;
using std::endl;
#include "Increment.h"
www.eeworm.com/read/208576/15243795
h increment.h
// Fig. 10.7: Increment.h
// Definition of class Increment.
#ifndef INCREMENT_H
#define INCREMENT_H
class Increment
{
public:
Increment( int c = 0, int i = 1 ); // default constructor
www.eeworm.com/read/35675/1059614
do_increment
#!/bin/bash
# Scriptname: do_increment
increment () {
local sum; # sum is known only in this function
let "sum=$1 + 1"
return $sum # Return the value of sum to the script
}
echo
www.eeworm.com/read/35675/1059840
do_increment
#!/bin/ksh
# Scriptname: do_increment
# Using the return Command)
function increment {
typeset sum # sum is a local variable.
(( sum = $1 + 1 ))
return $sum # Return the value of su
www.eeworm.com/read/35675/1059909
do_increment
#!/bin/sh
# Scriptname: do_increment
increment () {
sum=`expr $1 + 1`
return $sum # Return the value of sum to the script.
}
echo -n "The sum is "
increment 5 # Call function increment; pass
www.eeworm.com/read/490333/1200270
cs increment.cs
// Fig. 4.14: Increment.cs
// Preincrementing and postincrementing
using System;
namespace Increment
{
///
/// Summary description for Class1.
///
class In
www.eeworm.com/read/490333/1200272
sln increment.sln
Microsoft Visual Studio Solution File, Format Version 7.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Increment", "Increment.csproj", "{C0ABC308-6832-4365-9191-9237EFCA56B6}"
EndProject
G