Monday, June 30, 2014

Tutorial for Beginners 16 - Constructor and Destructors in C#










1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System;
namespace MyProject.Examples
{
    class Box
    {
        public double l,b,h;

        public double volume()
        {
            return (this.l * this.b * this.h);
        }
        public Box(double la,double br,double hi)
        {
            this.l = la;
            this.b = br;
            this.h = hi;
        }
        ~Box(){
            Console.WriteLine("The Distructor is called");
        }
    }
    class ExampleOne
    {
        public static void Main()
        {
            Box box1 = new Box(46,60,20);
            

            Console.WriteLine("Volume of box1 is {0}", box1.volume());

            Console.ReadKey();
        }
    }
}




Sunday, June 29, 2014

Tutorial for Beginners 15 - Introduction to C# Classes and Objects









1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System;
namespace MyProject.Examples
{
    class Box
    {
        public double l,b,h;

        public double volume()
        {
            return (this.l * this.b * this.h);
        }
    }
    class ExampleOne
    {
        public static void Main()
        {
            Box box1 = new Box();
            box1.l = 45;
            box1.b = 10;
            box1.h = 20;

            Console.WriteLine("Volume of box1 is {0}", box1.volume());

            Box box2 = new Box();
            box2.l = 34;
            box2.b = 50;
            box2.h = 50;

            Console.WriteLine("Volume of box2 is {0}", box2.volume());

            Console.ReadKey();
        }
    }
}




























------------------------------------------------------------------------------

Searches related to Introduction to C# Classes and Objects

classes and objects in c# net

Introduction to C# classes

Introduction to Classes, Objects, Methods and Strings

Searches related to C# Classes

c# classes get set

c# classes online

c# classes and objects

c# classes vs structs

c# classes and methods

c# classes from xsd

c# classes properties

c# classes to represent keys in windows registry

A Basic Introduction of Class for Beginners

Basic Introduction to Classes and Objects

Introduction to Objects and Classes in C#

Introduction to C# Programming with Microsoft .NET

c# classes and objects tutorials

classes and objects in c# pdf

classes and objects in c# ppt

C# Tutorial for Beginners 14 - Method Overloading in C#









1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using System;
namespace MyProject.Examples
{
    class ExampleOne
    {
        public static void Main()
        {
            Console.WriteLine("sum of two ints is {0}",sum(45,64) );
            Console.WriteLine("sum of two double is {0}", sum(45.45, 64.64));
            Console.WriteLine("sum of two double is {0}", sum("Hello ", "Youtube"));
            Console.ReadKey();
        }

        public static int sum(int x, int y)
        {
            int add = x + y;
            return add;
        }
        public static double sum(double x, double y)
        {
            double add = x + y;
            return add;
        }
        public static string sum(string x, string y)
        {
            string add = x + y;
            return add;
        }

    }
}














-----------------------------------------------------------

Searches related to method overloading in c#

method overriding in c#

method overloading in c# msdn

c# method overloading tutorial

method overloading in c# codeproject

why we use method overloading in c#

method overloading in c# with different return type

difference between method overriding and method overloading in c#

signature method overloading in c#

Visual C# .NET Classes and Objects: Method Overloading

How To Compress Video Files Up to 5 Times less Their Size Without Losing...





































----------------------------------------------------------------

How to make video sizes smaller but KEEP QUALITY

How To Compress Video Files Less Than 5 Times Their

How To Compress Videos 10x There Normal Size

how to compress video files while keeping high quality

Tutorial: How to compress video files but keep the quality

How To Compress Video Files Less Than 5 Times Their size

Searches related to How To Compress Video Files Less

how to compress video files to smaller size

how to compress a video file in compressor

how to compress video files without losing quality

how to compress video files for email

how to compress video files online

how to compress video files using winrar

how to compress video files in mac

how to compress video files in windows 7

How To Compress A Video File

How To Compress Video

How to compress a video file by shrinking to smaller size

How to compress large video files without losing quality

Saturday, June 28, 2014

C# Tutorial for Beginners 13 - Passing Reference , Output and params Pa...





Passing Reference Parameter 



using System;
namespace MyProject.Examples
{
    class ExampleOne
    {
        public static void Main()
        {
            int y = 0;
            MyFunc(ref y);

            Console.WriteLine(y);


            Console.ReadKey();
        }

        public static void MyFunc(ref int x)
        {
            x = 10;
        }

    }
}






Passing Output Parameter 



using System;
namespace MyProject.Examples
{
    class ExampleOne
    {
        public static void Main()
        {
            int a=45,b=67;
            int sum = 0;
            int product = 0;
            MyCalc(a, b, out sum, out product);

            Console.WriteLine("Sum = {0} and Product ={1}", sum,product);


            Console.ReadKey();
        }

        public static void MyCalc(int x, int y, out int sum, out int prod)
        {
            sum = x + y;
            prod = x * y;
             
        }

    }
}






Passing params Parameter 



using System;
namespace MyProject.Examples
{
    class ExampleOne
    {
        public static void Main()
        {
            string[] myArray = new string[4];
            myArray[0] = "name1";
            myArray[1] = "name2";
            myArray[2] = "name3";
            myArray[3] = "name4";

            ArrayMethod();
            //or
            ArrayMethod(myArray);
            //or
            ArrayMethod("n1","n2","n3");

            Console.ReadKey();
        }

        public static void ArrayMethod(params string[] names)
        {
           foreach(string name in names)
           {
               Console.WriteLine(name);
           }
           Console.WriteLine("Array Size = {0}", names.Length);
             
        }

    }
}


















------------------------------------------------------------------

Searches related to method output parameters and return in c#

c# method return 2 variables

c# - How to pass a single object[] to a params object[]

C# Passing arguments by default is ByRef instead of ByVal

Searches related to pass by params parameters in c#

c# pass variable number of arguments

c# pass arguments by reference

 c# pass arguments

c# pass arguments to main

c# timer pass arguments

c# pass arguments to thread

pass arguments to exe c#

c# pass arguments to process

How are parameters passed in C#

C# Parameter Passing, Ref and Out

c# method return multiple variables

c# stored procedure output parameters

return output parameter stored procedure c#

c# call stored procedure with output parameters

c# function output parameter

Passing Parameters

Passing Objects By Reference or Value in C#

C# Tutorial for Beginners 12 - Method Passing Parameters and Return







using System;
namespace MyProject.Examples
{
    class ExampleOne
    {
        public static void Main()
        {
            int num1 = 0, num2 = 0;
            //Accepting Values from users
            Console.Write("Enter first number\t\t");
            num1 = Convert.ToInt32(Console.ReadLine());

            Console.Write("\n\nEnter second number\t\t");
            num2 = Convert.ToInt32(Console.ReadLine());


                ExampleOne eOne=new ExampleOne();
                eOne.sum(num1, num2);
            
                Console.ReadKey();
        }

        public int sum(int no1,int no2)
        {
          
            int add = no1 + no2;
            return add;
            //
        }
    }
}
















------------------------------------

Passing Parameters C# Programming

C# Passing Parameters by Reference

How are parameters passed in C#?

ref (C# Reference)

Passing Reference-Type Parameters

Method Parameters (C# Reference)

Searches related to method parameters and return in c#

c# return multiple parameters

c# optional method parameters

c# method parameters array

c# method parameters optional

c# thread method with parameters

c# invoke method with parameters

c# get method parameters

c# default method parameters

C# Tutorial for Beginners 11 - Introduction to C# Methods







using System;
namespace MyProject.Examples
{
    class ExampleOne
    {
        public static void Main()
        {

                //ExampleOne eOne=new ExampleOne();
                //eOne.sum();
                ExampleOne.sum();
                Console.ReadKey();
        }

        public static void sum()
        {
            int no1 = 364, no2 = 234;
            int add = no1 + no2;
            Console.WriteLine("Addition\t\t{0}", add);
        }
    }
}








































-----------------------------------------------

Searches related to introduction to method in c#

c# process tutorial

c# function definition

c# extension methods tutorial

c# anonymous methods tutorial

c# lambda function tutorial

c sharp method

Introduction to the Methods of a Class

Introduction to Classes, Objects, Methods

Searches related to method in c#

abstract method in c#

finalize method in c#

dispose method in c#

anonymous method in c#

virtual method in c#

split method in c#

tostring method in c#

main method in c#

Thursday, June 26, 2014

C# Tutorial for Beginners 10 - For and Foreach Loop in C#









using System;
namespace MyProject.Examples
{
    class ExampleOne
    {
        static void Main()
        {

            string[] arr = new string[6]; // declaring array

            //Storing value in array element
            arr[0] = "Steven";
            arr[1] = "Clark";
            arr[2] = "Mark";
            arr[3] = "Thompson";
            arr[4] = "John";
            arr[5] = "Ram";

            foreach (string name in arr)
            {
                Console.WriteLine("Hello " + name);
            }

            for (int a = 0; a < 6; a++)
            {
                Console.WriteLine("value of a: {0}", arr[a]);
            }


                Console.ReadKey();
        }
    }
}


































---------------------------------------------------------

Searches related to foreach loop in c#

foreach loop in c# for datatable

foreach, in (C# Reference)

C# Foreach Loop Examples

FOREACH Vs. FOR (C#)

How do foreach loops work in C#?

How do I jump out of a foreach loop in C#?

c# - In .NET, which loop runs faster, 'for' or 'foreach'?

Loops - The complete C# Tutorial

C# foreach loop - C#

use foreach loop c#

for loop in c#

write foreach loop in c#

foreach loop in c# for list

foreach loop in c# for dataset

how to break foreach loop in c#

each loop c

Searches related to for loop in c#

for loop in c# example

syntax of for loop in c#

using for loop in c#

for loop in c sharp

exit for loop in c#

nested for loop in c#

for loop in c# windows application

foreach loop in c#

Searches related to foreach loop in c#

foreach loop in c# for datatable

use foreach loop c#

for loop in c#

write foreach loop in c#

foreach loop in c# for list

foreach loop in c# for dataset

how to break foreach loop in c#

each loop c

C# Tutorial for Beginners 9 - C# Do While Loop









using System;
namespace MyProject.Examples
{
    class ExampleOne
    {
        static void Main()
        {

            Console.Write("Please Enter a Number ");
            int no = int.Parse(Console.ReadLine());
            int count=0;
            int count1 = 0;
            while (count < no)
            {
                Console.Write("While Number : {0} \n", count);
                count++; 
            }

            do{
                Console.Write("Do while Number : {0} \n", count1);
                count1++;
            } while (count1 < no);

            Console.ReadKey();
        }
    }
}


















------------------------------------------------

How to use C# while loop

while (C# Reference)

C# While Loop Examples

Visual C# .NET - Do loops and While Loops

Searches related to c# while loop

c# while loop continue

c# while loop exit

c# do while loop

c# while loop datatable

c# while loop timer

c# while loop multiple conditions

c# while loop timeout

c# while loop break

Loops - The complete C# Tutorial

C# While Loops

How to use C# while loop

Wednesday, June 25, 2014

C# Tutorial for Beginners 7 - The switch statement (C#)









using System;
namespace MyProject.Examples
{
    class ExampleOne
    {
        static void Main()
        {

            Console.Write("Please Enter Students Marks ");
            int marks = int.Parse(Console.ReadLine());

            switch (marks)
            { 
                case 90:
                case 60:
                case 30:
                    Console.Write("marks entered {0}",marks);
                    break;
                default:
                     Console.Write("Please Enter Valid Vluee");
                    break;
            
            }


            Console.ReadKey();
        }
    }
}




















------------------------------------------------

Searches related to c# switch

c# switch string

How to use C# switch case statements

c# switch enum

c# switch case range

c# switch multiple case

C# Switch Statements: Case and Goto

c# switch fall through

c# switch case multiple conditions

c# switch case default

c# switch case enum

Monday, June 23, 2014

C# Tutorial for Beginners 6 - C# Arrays









using System;
namespace MyProject.Examples
{
    class ExampleOne
    {
        static void Main()
        {

            string[] myArray = new string[4];
            myArray[0] = "3";
            myArray[1] = "34";
            myArray[2] = "37";
            myArray[3] = "65";
            Console.Write(myArray[4]);

            Console.ReadKey();
        }
    }
}
















---------------------------------------------------

Searches related to c# array

Single-Dimensional Array

c# array class

c# array of objects

c# multidimensional array

c# array initialization

c# array to string

c# array contains

c# array of arrays

c# array indexof

C# Tutorial for Beginners 6 - C# Arrays









using System;
namespace MyProject.Examples
{
    class ExampleOne
    {
        static void Main()
        {

            string[] myArray = new string[4];
            myArray[0] = "3";
            myArray[1] = "34";
            myArray[2] = "37";
            myArray[3] = "65";
            Console.Write(myArray[4]);

            Console.ReadKey();
        }
    }
}
















---------------------------------------------------

Searches related to c# array

Single-Dimensional Array

c# array class

c# array of objects

c# multidimensional array

c# array initialization

c# array to string

c# array contains

c# array of arrays

c# array indexof

Sunday, June 22, 2014

C# Tutorial for Beginners 5 - If-Statement with Comparison Operators and...









1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System;
namespace MyProject.Examples
{
    class ExampleOne
    {
        static void Main()
        {
            int num1, num2;            
            //Accepting Values from users
            Console.Write("Enter first number\t\t");
            num1 = Convert.ToInt32(Console.ReadLine());

            Console.Write("\n\nEnter second number\t\t");
            num2 = Convert.ToInt32(Console.ReadLine());

            if(num1<num2 || num1==20)
            {
                Console.Write("num1 is less then num2 or num 1 is 20\t\t");
            }
            else if (num1 == num2)
            {
                Console.Write("num1 is = num2\t\t");
            }
            else
            {
                Console.Write("num1 is gererat then num2\t\t");
            }
  
            Console.ReadKey();
        }
    }
}


















-----------------------------------------------

Searches related to c# if statement

c# if statement shorthand

c# if statement multiple conditions

c# if statement string

c# if statement one line

c# if statement or operator

c# if statement not equal

nested if statement c#

c# assignment in if statement

Searches related to c# Comparison Operators

c# comparison operators enum

relational operators

equality comparison

operators equality

c# logical operator

c# string comparison operators

c# override comparison operator

Searches related to c# Logical Operator

c# logical operator precedence

c# logical operator short circuit

c# boolean operators

c# logical xor operator

.net & operator

c# not operator

visual c# operators

c# short circuit

c# logical operators precedence

C# Tutorial for Beginners 5 - If-Statement with Comparison Operators and...









1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System;
namespace MyProject.Examples
{
    class ExampleOne
    {
        static void Main()
        {
            int num1, num2;            
            //Accepting Values from users
            Console.Write("Enter first number\t\t");
            num1 = Convert.ToInt32(Console.ReadLine());

            Console.Write("\n\nEnter second number\t\t");
            num2 = Convert.ToInt32(Console.ReadLine());

            if(num1<num2 || num1==20)
            {
                Console.Write("num1 is less then num2 or num 1 is 20\t\t");
            }
            else if (num1 == num2)
            {
                Console.Write("num1 is = num2\t\t");
            }
            else
            {
                Console.Write("num1 is gererat then num2\t\t");
            }
  
            Console.ReadKey();
        }
    }
}


















-----------------------------------------------

Searches related to c# if statement

c# if statement shorthand

c# if statement multiple conditions

c# if statement string

c# if statement one line

c# if statement or operator

c# if statement not equal

nested if statement c#

c# assignment in if statement

Searches related to c# Comparison Operators

c# comparison operators enum

relational operators

equality comparison

operators equality

c# logical operator

c# string comparison operators

c# override comparison operator

Searches related to c# Logical Operator

c# logical operator precedence

c# logical operator short circuit

c# boolean operators

c# logical xor operator

.net & operator

c# not operator

visual c# operators

c# short circuit

c# logical operators precedence

C# Tutorial for Beginners 4 - Arithmetic Operators and Simple Calculator











1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using System;
namespace MyProject.Examples
{
    class ExampleOne
    {
        static void Main()
        {
            // '+'   '-'   '*'    '/'   '%' 
            int num1, num2;
            int add, sub, mul,rem;
            float div;
            
            //Accepting Values from users
            Console.Write("Enter first number\t\t");
            num1 = Convert.ToInt32(Console.ReadLine());

            Console.Write("\n\nEnter second number\t\t");
            num2 = Convert.ToInt32(Console.ReadLine());


            // '+' operator for adding values
            add = num1 + num2;
            // '-' operator for subtracting values
            sub = num1 - num2;
            // '*' operator for multiplying values
            mul = num1 * num2;
            // '/' operator for dividing values
            div = (float)num1 / num2;

            // '%' operator for Remainder values
            rem = num1 % num2;

            //Displaying Output           
            Console.WriteLine("Addition\t\t{0}", add);
            Console.WriteLine("Subtraction\t\t{0}", sub);
            Console.WriteLine("Multiplication\t\t{0}", mul);
            Console.WriteLine("Division\t\t{0}", div);
            Console.WriteLine("remainder \t\t{0}", rem);
            Console.ReadKey();
        }
    }
}














--------------------------------------------

Searches related to arithmetic operators in c#

c# math operations

C# Operators

C# Programming/Operators

C# Program to Perform all Basic Arithmetic Operations

.net arithmetic operators

c# operator list

c# operator =

c# operater

c#.net or operator

comparison operator in c#

c# operato

C# Tutorial for Beginners 1 - Input and Output to Console











1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
using System;

namespace MyProject.Examples
{
    class ExampleOne
    {
        static void Main()
        {
            Console.Write("Please Enter  number 1 ");
            int x = int.Parse(Console.ReadLine());

            Console.Write("Please Enter  number 2 ");
            int y = int.Parse(Console.ReadLine());

            int z = x + y;

            Console.Write("The Sum of  {0} and {1} is {2} ", x, y,z);
            Console.ReadKey();
        }
    }
}
















-------------------------------------------------------------------------

Searches related to C# Input and Output to Console

c# console application input output

c# console get input

c# console output to file

Beginner: C# input output program issues

 Console Input Output - C# Fundamentals

c# console output color

c# view console output

c# file input output


Saturday, June 21, 2014

C# Tutorial for Beginners 1 - Introduction and Creating First C# Program











1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
using System;

namespace MyProject.Examples
{
    class ExampleOne
    {
        static void Main()
        {
            Console.Write("Welcome to this Tutorial");
            Console.ReadKey();
        }
    }
}
















-----------------------------------------------------------

Searches related to c# tutorial for beginners

C# programming tutorial - Step by Step

c# tutorial for beginners with examples

Beginning C# Tutorial: Introduction to the Visual Studio

c# tutorial pdf

c# tutorial for beginners pdf

c# tutorial for beginners ppt

c# tutorial for beginners video

C# Tutorial and Programming

csharp tutorial

c# tutorial for beginners pdf free download

asp.net c# tutorial for beginners

How to Convert Video Files using VLC Media Player























----------------------------------------------

How to Use VLC Player to Convert Videos From One Format to another

Searches related to How to convert Videos vlc

how to convert vlc videos to itunes

how to convert realplayer videos to vlc

How to Convert Video to MP3 in VLC Media Player

convert video to mp3 vlc

convert videos with vlc mac

how to convert videos with vlc media player

How to Convert Video Files using VLC Media Player



























-----------------------------------------------------------------

How to Use VLC Player to Convert Videos From One Format to another

Searches related to How to convert Videos vlc

how to convert vlc videos to itunes

how to convert realplayer videos to vlc

How to Convert Video to MP3 in VLC Media Player

convert video to mp3 vlc

convert videos with vlc mac

how to convert videos with vlc media player

How to Convert Video Files using VLC Media Player



























-----------------------------------------------------------------

How to Use VLC Player to Convert Videos From One Format to another

Searches related to How to convert Videos vlc

how to convert vlc videos to itunes

how to convert realplayer videos to vlc

How to Convert Video to MP3 in VLC Media Player

convert video to mp3 vlc

convert videos with vlc mac

how to convert videos with vlc media player

Monday, June 16, 2014

C++ Beginners Tutorial 27 - Introduction To Constructors in C++











1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <iostream>
#include<string>
using namespace std;

class Books{
 public:
     Books(string x)
     {
       setName(x);
     }
     void setName(string x)
     {
         name=x;
     }
     string getName()
     {
        return name;
     }
 private:
    string name;
};
int main()
{
    Books book1("C++ tutorial");
    cout<<book1.getName()<<endl;


    Books book2("java tutorials");
    cout<<book2.getName()<<endl;
    return 0;
}












----------------------------------------------------------------------------------------------

Introduction To Constructors

Searches related to c++ constructor

Searches related to c++ introduction to constructor

copy constructors in c++

types of constructors in c++

constructors in c++ ppt

constructors and destructors in c++

constructors in c++ pdf

parameterized constructors in c++

default constructors in c++

types of constructors in c++ with example

c++ constructor example

c++ constructor initialization list

c++ constructor initialization

c++ constructor syntax

c++ constructor call another constructor

c++ constructor chaining

copy constructor c++

c++ constructor overloading

C++ Beginners Tutorial 27 - Introduction To Constructors in C++











1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <iostream>
#include<string>
using namespace std;

class Books{
 public:
     Books(string x)
     {
       setName(x);
     }
     void setName(string x)
     {
         name=x;
     }
     string getName()
     {
        return name;
     }
 private:
    string name;
};
int main()
{
    Books book1("C++ tutorial");
    cout<<book1.getName()<<endl;


    Books book2("java tutorials");
    cout<<book2.getName()<<endl;
    return 0;
}












----------------------------------------------------------------------------------------------

Introduction To Constructors

Searches related to c++ constructor

Searches related to c++ introduction to constructor

copy constructors in c++

types of constructors in c++

constructors in c++ ppt

constructors and destructors in c++

constructors in c++ pdf

parameterized constructors in c++

default constructors in c++

types of constructors in c++ with example

c++ constructor example

c++ constructor initialization list

c++ constructor initialization

c++ constructor syntax

c++ constructor call another constructor

c++ constructor chaining

copy constructor c++

c++ constructor overloading

Saturday, June 14, 2014

C++ Beginners Tutorial 26 - Setter/Getter functions in C++











1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <iostream>
#include<string>
using namespace std;

class Books{
 public:
     void setName(string x)
     {
         name=x;
     }
     string getName()
     {
        return name;
     }
 private:
    string name;
};
int main()
{
     Books book1;
     book1.setName("C++ tutrials");
     cout<<book1.getName()<<endl;
    return 0;
}
















---------------------------------------------------------

Searches related to c++ getter setter functions how to use

why use getter and setter methods in java

how to use getter and setter methods in c#

c++ getter setter macro

Are getters and setters fine to use for - C++

getters & setters are bad, design patter

private string setters and getters

setter and getter function for an array

setters and getters?

c++ getter setter array

C++ getters/setters coding style

Conventions for accessor methods (getters and setters)

Getter and Setter Methods - C/C++

c++ - If a variable has getter and setter

Setter/Getter functions in C++ program?

c++ getter setter vs public

c++ getter setter example

C++ Beginners Tutorial 25 - Introduction to C++ Classes and Objects











1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
#include <iostream>
#include <cstring>
using namespace std;
///A class is the collection of related data and function under a single name
class Books{
  public:
     int Id=256;
     void printBookID()
     {
         cout<<"The book Id is="<<Id<<endl;
     }
};
int main()
{
    Books book1;
    book1.printBookID();
    cout<<book1.Id<<endl;
    return 0;
}














-------------------------------------------------------------

C++ Classes and Objects

Introduction to Classes in C++

c++ introduction to classes and objects in c++

Object-Oriented Programming-- Introduction to Classes

c++ classes and objects ppt

concept of classes and objects in c++

classes and objects in c++ pdf

classes and objects in c++ notes

classes and objects in c++ tutorial

classes and objects in c++ questions

classes and objects in java

Thursday, June 12, 2014

C++ Beginners Tutorial 24 - How to pass a structure to a function in C++









1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <iostream>
#include <cstring>
using namespace std;

struct Books
{
    char name[50];
    char auther[50];
    int id;
};
void printBook(struct Books book)
{
    cout<<"Book 1 name: "<<book.name<<endl;
    cout<<"Book 1 auther: "<<book.auther<<endl;
    cout<<"Book 1 id: "<<book.id<<endl;
}
int main()
{

    struct Books book1;

    strcpy(book1.name,"C++ tutorials");
    strcpy(book1.auther,"ProgrammingKnowledge");
    book1.id=1;

    printBook(book1);

    return 0;
}






















--------------------------------------------------------

passing structures to functions

pass one structure to function

Searches related to How to pass a structure to a function in C++

passing an array of structures to a function in c++

passing an array of structures to a function

passing an array of structures to a function in c

pass array of structs to function

how do you return a structure from functions

how to return a struct from a function in c++

pointer in structure

pointer struct

Structure function in C++ 9 posts

Member functions inside struct








C++ Beginners Tutorial 23 - Data structures or struct (C++)











1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <iostream>
#include <cstring>
using namespace std;

struct Books
{
    char name[50];
    char auther[50];
    int id;
    
};

int main()
{ 

    struct Books book1;

    strcpy(book1.name,"C++ tutorials");
    strcpy(book1.auther,"ProgrammingKnowledge");
    book1.id=1;

    cout<<"Book 1 name: "<<book1.name<<endl;
    cout<<"Book 1 auther: "<<book1.auther<<endl;
    cout<<"Book 1 id: "<<book1.id<<endl;

    return 0;
}




















----------------------------------------------------------

Searches related to c++ structure

c++ structure example

c++ structure initialization

c++ structure array

c++ structure constructor

c++ structure definition

c++ structure vs class

c++ structure alignment

c++ structure padding

Wednesday, June 11, 2014

C++ Beginners Tutorial 22 - Pass by Reference / Value in C++









1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <iostream>
using namespace std;

void passByValue(int val)
{
    val=100;
}
void passByReference(int *val)
{
    *val=100;
}
int main()
{
    int x=20;
    int y=20;

    passByValue(x);
    cout<<x<<endl;

    passByReference(&y);
    cout<<y<<endl;
    return 0;
}














--------------------------------------------------

Searches related to c++ pass by reference vs value

c++ pass by value vs const reference

Does C++ pass objects by value or reference

When to pass parameters by value, reference

Function pass by value vs. pass by reference

C++ Tutorial: Value vs. Reference

difference between pass by reference and pass by value in c++

c++ object pass by reference or pass by value

c++ pass by reference vs pointer

c++ pass object by reference

pass by const reference

c++ pass by constant reference

c++ pass int by reference

C++ Beginners Tutorial 21 - Pointers in C++











1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
#include <iostream>
using namespace std;

int main()
{
///What is a Pointer?
///A pointer is a variable whose value is the address of another variable.
int var=100;
cout<<&var<<endl;

 int *intP;
 intP=&var;

 cout<<intP<<endl;
 cout<<*intP<<endl;
 var=20;
 cout<<intP<<endl;
 cout<<*intP<<endl;

    return 0;
}


















--------------------------------------------------------

Searches related to pointer in c++

pointer in c++ example

pointer in c++ pdf

pointer in c++ wikipedia

function pointer in c++

pointer in c++ tutorial

Pointers - C++ Tutorials

Pointer to int. C++

auto pointer in c++

this pointer in c++ ppt

pointer in c++ definition

C++ Beginners Tutorial 21 - Pointers in C++











1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
#include <iostream>
using namespace std;

int main()
{
///What is a Pointer?
///A pointer is a variable whose value is the address of another variable.
int var=100;
cout<<&var<<endl;

 int *intP;
 intP=&var;

 cout<<intP<<endl;
 cout<<*intP<<endl;
 var=20;
 cout<<intP<<endl;
 cout<<*intP<<endl;

    return 0;
}


















--------------------------------------------------------

Searches related to pointer in c++

pointer in c++ example

pointer in c++ pdf

pointer in c++ wikipedia

function pointer in c++

pointer in c++ tutorial

Pointers - C++ Tutorials

Pointer to int. C++

auto pointer in c++

this pointer in c++ ppt

pointer in c++ definition

C++ Beginners Tutorial 21 - Pointers in C++











1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
#include <iostream>
using namespace std;

int main()
{
///What is a Pointer?
///A pointer is a variable whose value is the address of another variable.
int var=100;
cout<<&var<<endl;

 int *intP;
 intP=&var;

 cout<<intP<<endl;
 cout<<*intP<<endl;
 var=20;
 cout<<intP<<endl;
 cout<<*intP<<endl;

    return 0;
}


















--------------------------------------------------------

Searches related to pointer in c++

pointer in c++ example

pointer in c++ pdf

pointer in c++ wikipedia

function pointer in c++

pointer in c++ tutorial

Pointers - C++ Tutorials

Pointer to int. C++

auto pointer in c++

this pointer in c++ ppt

pointer in c++ definition

C++ Beginners Tutorial 21 - Pointers in C++











1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
#include <iostream>
using namespace std;

int main()
{
///What is a Pointer?
///A pointer is a variable whose value is the address of another variable.
int var=100;
cout<<&var<<endl;

 int *intP;
 intP=&var;

 cout<<intP<<endl;
 cout<<*intP<<endl;
 var=20;
 cout<<intP<<endl;
 cout<<*intP<<endl;

    return 0;
}


















--------------------------------------------------------

Searches related to pointer in c++

pointer in c++ example

pointer in c++ pdf

pointer in c++ wikipedia

function pointer in c++

pointer in c++ tutorial

Pointers - C++ Tutorials

Pointer to int. C++

auto pointer in c++

this pointer in c++ ppt

pointer in c++ definition

Monday, June 9, 2014

C++ Beginners Tutorial 20 - Multidimensional Arrays



 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
#include <iostream>
using namespace std;

int main()
{
    /// 1 2 3
    /// 4 4 5
    int myArray[2][3]={{1,2,3},{4,4,5}};

    for(int row=0;row<2;row++)
    {
        for(int column=0;column<3;column++)
        {
            cout<<myArray[row][column]<<" ";
        }
        cout<<endl;
    }
    return 0;
}



















------------------------------------------

Searches related to c++ multidimensional arrays

multidimensional arrays forums

sorting multidimensional arrays c++

handling huge multidimensional arrays c++

using arrays c++

initializing an array c++

Multi-Dimensional Arrays - C++

C++ Multi-dimensional Arrays

C++ Tutorials Two Dimensional Array

C++ multidimensional array operator

c++ dynamic multidimensional arrays

printing multidimensional arrays c++

allocating multidimensional arrays in c++

C++ Beginners Tutorial 19 - Getting the sum of values in an array





1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
#include <iostream>
using namespace std;

int main()
{
    int myArray[6]={2,2,2,2,2,2};
    int sum=0;

    for(int i=0;i<6;i++)
    {
        sum+=myArray[i];
    }

    cout<<"sum= "<<sum<<endl;
    return 0;
}














---------------------------------------------------

To find the sum of an array element in C++ programming

How to add element to C++ array

I need help with finding the sum of elements in an array

c++ program to find sum of array element

c++ program to add two arrays

Sum of One Dimensional Array
IT Certification Category (English)640x480

Partner Sites

VideoToGifs.com

EasyOnlineConverter.com

SqliteTutorials.com


Top Online Courses From ProgrammingKnowledge

Python Course http://bit.ly/2vsuMaS
Java Coursehttp://bit.ly/2GEfQMf
Bash Coursehttp://bit.ly/2DBVF0C
Linux Coursehttp://bit.ly/2IXuil0
C Course http://bit.ly/2GQCiD1
C++ Coursehttp://bit.ly/2V4oEVJ
PHP Coursehttp://bit.ly/2XP71WH
Android Coursehttp://bit.ly/2UHih5H
C# Coursehttp://bit.ly/2Vr7HEl
JavaFx Coursehttp://bit.ly/2XMvZWA
NodeJs Coursehttp://bit.ly/2GPg7gA
Jenkins Course http://bit.ly/2Wd4l4W
Scala Coursehttp://bit.ly/2PysyA4
Bootstrap Coursehttp://bit.ly/2DFQ2yC
MongoDB Coursehttp://bit.ly/2LaCJfP
QT C++ GUI Coursehttp://bit.ly/2vwqHSZ