02-11-2013
What are Friend Functions in C++?
Hey C++ masters! I am a beginner in C++ and learning about it but have some doubts about Friend Functions. Anyone describe C++ Friend Functions?
3 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello Every One
Iam Your New Friend Reto .iam New In Unix Let Me Say That Iam Zero .
And I Wish That You All Can Help Me With It
By Your Help I Will Get To The Top
Your New Friend Reto From Iraq
Thank You All (0 Replies)
Discussion started by: retolop
0 Replies
2. Programming
Hello,
I have a problem by compiling a class with the following friend function in Header file:
class X{
private:
......
protected:
.......
public:
friend ostream& operator<<(ostream& target, const PARA_DSC& para);
}; (1 Reply)
Discussion started by: nik
1 Replies
3. Shell Programming and Scripting
I have 7 functions those need to be executed as command line inputs, I tried with below code it’s not executing function. If I run the ./script 2 then fun2 should execute , how to initiate that function I tried case and if else also, how to initiate function from command line
if
then... (8 Replies)
Discussion started by: saku
8 Replies
LEARN ABOUT PHP
str_split
STR_SPLIT(3) 1 STR_SPLIT(3)
str_split - Convert a string to an array
SYNOPSIS
array str_split (string $string, [int $split_length = 1])
DESCRIPTION
Converts a string to an array.
PARAMETERS
o $string
- The input string.
o $split_length
- Maximum length of the chunk.
RETURN VALUES
If the optional $split_length parameter is specified, the returned array will be broken down into chunks with each being $split_length in
length, otherwise each chunk will be one character in length.
FALSE is returned if $split_length is less than 1. If the $split_length length exceeds the length of $string, the entire string is returned
as the first (and only) array element.
EXAMPLES
Example #1
Example uses of str_split(3)
<?php
$str = "Hello Friend";
$arr1 = str_split($str);
$arr2 = str_split($str, 3);
print_r($arr1);
print_r($arr2);
?>
The above example will output:
Array
(
[0] => H
[1] => e
[2] => l
[3] => l
[4] => o
[5] =>
[6] => F
[7] => r
[8] => i
[9] => e
[10] => n
[11] => d
)
Array
(
[0] => Hel
[1] => lo
[2] => Fri
[3] => end
)
SEE ALSO
chunk_split(3), preg_split(3), explode(3), count_chars(3), str_word_count(3), for.
PHP Documentation Group STR_SPLIT(3)