C++ Ask

Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
R

redfield2013

Konuyu başlatan
Üye
Katılım
2 Şub 2019
Mesajlar
27
Tepki puanı
1
Yaş
24
Is there any Tutorial video for C++?
 
F

FanOFMemoryHacks

***Remember Me in Your Prayers***
Ultra Üye
Katılım
7 May 2018
Mesajlar
2,940
Çözümler
15
Tepki puanı
203
Just watch the video below.

 
H

haiztek

no value
Seçkin Üye
Katılım
17 Nis 2020
Mesajlar
576
Çözümler
2
Tepki puanı
38
Yaş
20
There are so many sites and videos to learn form google and youtube. Google play store had c++ learning apps there
 
V

vuduymanh

Cezalı Üye
Banlı Üye
Katılım
11 Haz 2020
Mesajlar
88
Tepki puanı
2
Yaş
23
dont use and you will not get
 
O
Katılım
20 Haz 2019
Mesajlar
3
Tepki puanı
1
Yaş
24
Guys need help


#include<iostream>

#include<pthread.h>

#include<sys/types.h>

#include <stdio.h>

#include <stdlib.h>

using namespace std;





void *Division(void *arg_div)

{



int *input =(int *)arg_div;

int result = input[0]/input[1];

cout<<"Final result"<<endl;

cout << result ;

pthread_exit(NULL);

}



void *Multiplication(void *arg_mul)

{

int *input =(int *)arg_mul;



int arg1[2];

arg1[0]=input[0]*input[1];

arg1[1]=input[2];



cout<<"Multiplication result"<<endl;

cout<<arg1[0];

cout<<arg1[1];



pthread_t div;

pthread_create(&div,NULL,Division,(void*)arg1);

pthread_join(div,NULL);

pthread_exit(NULL);

}



void *Addition(void *arg_add)

{



int *input =(int *)arg_add;



int arg[3];

arg[0]=input[0]+input[1];

arg[1]=input[2]+input[3];

arg[2]=input[4];



cout<<"output of add function"<<endl;

cout<<arg[0]<<endl;

cout<<arg[1]<<endl;

cout<<arg[2]<<endl;



pthread_t ad;

pthread_create(&ad,NULL,Multiplication,(void*)arg);

pthread_join(ad,NULL);

pthread_exit(NULL);

}



int main()

{

int values[5];

for(int i=0;i<5;i++)

{

cin >> values;

}

pthread_t pa;

pthread_create(&pa,NULL,Addition,(void*)values);

pthread_join(pa,NULL);

return 0;

}




(Threads Parameters Passing)

Using the same method as above create a program that passes parameters from one function to other. You must have at least four functions. Like if you implement a quartic equation function it includes operations such as square root, multiplication, subtraction and division. You must implement an equation something like that and create threads while passing parameters as void pointers to the next function.



(Thread Synchronization)

You will implement same equation. This time all threads are to be created in a main thread and you have to perform synchronization among these so that flow of the program remains same. You can use any method as you like signal handling, lock and test, semaphores or monitors. Use any method that you wish to implement.



Any one that can help mein this please
 
W

wiredx

Süper Üye
Katılım
10 Mar 2019
Mesajlar
632
Çözümler
5
Tepki puanı
42
Yaş
22
yes there are many tutorials on how to start learning c++, mostly are on youtube :D
 
K

koper007

Onaylı Üye
Katılım
16 Haz 2020
Mesajlar
53
Tepki puanı
4
Yaş
23
Cheat and hack for R6 ?? I don't think it's allowed here
 
K

Kusarika

T H O R
Süper Üye
Katılım
12 Haz 2020
Mesajlar
652
Çözümler
2
Tepki puanı
104
Yaş
22
Udemy ve youtube üzerinde fazlasıyla var dostum.
 
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...