49,761 Topics

Member Avatar for
Member Avatar for arashe

I need an algorithm that check some arrays and if the condition was true * all of them at -1 // Otello.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> using namespace std; static int bazi[8][8] = { 0 }; int turn = 1; …

Member Avatar for arashe
0
147
Member Avatar for raliot

I need a help , to make this code to sort data from text file.Any help is appreciated! file: 50 72 10 30 90 4 23 #include<iostream> #include<conio.h> void mergesort(int[],int,int); void merge(int[],int,int,int); void main() { int a[20],p,q,r,i,n; cout<<"Enter the number of elements"; cin>>n; p=0; r=n-1; cout<<"Enter the array"; for(i=0;i<n;i++) { …

Member Avatar for Maritimo
0
328
Member Avatar for marlyana

Write a program that has an array of integers as below: -12, 3, -12, 4, 1, 1, -12, 1, -1, 1, 2, 3, 4, 2, 3, -12 The program should counts the number of occurrences of each array element. Output a two-column list where the first column is a list …

Member Avatar for shayan_doust
0
144
Member Avatar for SAmrEen_2

Write a program that inputs basic salary and calculates 35%dearness allowance'25% house rentand then displays the gross salary.

Member Avatar for ralhamami
0
90
Member Avatar for shahera.arafat

(node.h) This is the code and it gives me these errors >>which confused me alot >>what are these errors ?!! and what is the problem ?!! Error 3 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 12 graph.h Error 4 error C2660: 'graph::create' : …

Member Avatar for tinstaafl
0
210
Member Avatar for lewashby

[Linux] Mint I wrote the following code from an SDL book I have and it seems to be building just fine but when I go to run the program I get this error -> "Launch failed, Binary not found." I used Eclipse as my IDE and the setting are adjusted …

Member Avatar for tinstaafl
0
270
Member Avatar for N S K

how to identify a file has virus by comparing file with virus signature in c or c++? i tried hash MD5 methods but it reads the pattern in a file whitch matches the signature pattern?

Member Avatar for rubberman
0
84
Member Avatar for chumli

I have finally got the game running but it ends too early. I need to make the game continue until there are 4 in a row but it ends after the first turn and no disk is dropped. do { cout << "Drop a " << (player == 'R' ? …

Member Avatar for chumli
0
158
Member Avatar for senait.kifle.127

I am running into problems reading in a csv file. I have an inventory.csv file with three columns and around 10,000 rows. The last column is supposed to be ignored. The csv format looks like this Shelf number; item name; item number. (So here item number shall be ignored). After …

Member Avatar for Moschops
0
2K
Member Avatar for Zaki.cpp

I have a problem of connection between two application ( with c++ builder ), the apps are working good in a local network, but aren't work in the internet, `cause both of the client and the server are in deferent routers, and each one have an internal & external IP, …

0
164
Member Avatar for usmanjani

please help me identify the objects,their relations (Association, aggregation and Composition) of a university ?

Member Avatar for usmanjani
0
158
Member Avatar for chumli

Ok so I completed my hangman code but now I have to read the words from a .txt. I have looked at numerous codes and examples but cant get it to work at all. Any help I would be grateful. #include <iostream> #include <string> #include <vector> #include <algorithm> #include <ctime> …

Member Avatar for chumli
0
142
Member Avatar for shahera.arafat
Member Avatar for Tahani

Write a complete C++ program that reads number of employees, then initialize an array to store employee's salaries. Your program should reads the salaries from the user then add 250 as a bounce for salaries less than 5000 Saudi Riyal . they asked me to initialize an array that has …

Member Avatar for deceptikon
0
99
Member Avatar for juanpa_2510

Is it valid to use an integer variable as a condition? I mean: int var = 20; if (var) { //code here } I know that when var == 0 it's equivalent to false and true if 1, but otherwise could it be a valid question?

Member Avatar for deceptikon
0
172
Member Avatar for kent.pe

Program1 (100 points) Create a program that will display 5 options. If the user enter 1, the program should compute the square and cube compute of an input number. 2, the program should give the first n Fibonacci sequence. 3, the program will find the factorial of n. 4, the …

Member Avatar for happygeek
-2
152
Member Avatar for yaya1234

hey, I need to read from a file but withput using string... I tried this... // reading a text file // reading a text file #include <iostream> #include <fstream> #include <string> using namespace std; int main () { char line[120]; ifstream myfile ("example.txt"); if (myfile.is_open()) { while ( getline (myfile,line) …

Member Avatar for yaya1234
0
1K
Member Avatar for omar.elbakly.95

how to draw an inverted triangle after asking the user for the number of rows in c++ usin reursion not for loop as this code #include<stdio.h> #include <conio.h> int main() { int rows,i,j,space; printf("Enter number of rows: "); scanf("%d",&rows); for(i=rows;i>=1;--i) { for(space=0;space<rows-i;++space) printf(" "); for(j=i;j<=2*i-1;++j) printf("* "); for(j=0;j<i-1;++j) printf("* "); …

Member Avatar for Maritimo
0
1K
Member Avatar for ozzan93

Hey everyone, I have an assignment for tomorrow and I don't have any clue about this last question. "Q5- Consider a waiting queue in a bank with customers who are issued direction slips. They are asked to move to following service terminals depending on their customer numbers being divided by …

Member Avatar for L7Sqr
0
413
Member Avatar for bilal qadri

how to create dynamic object array with over loaded constructor call plz help and tell me the syntax ...

Member Avatar for Maritimo
0
93
Member Avatar for justinlake888

hello... I am trying to convert 2 digit numbers to words: example 11= eleven. I saw some other entries on this but they dont include case or switch so far I have: [code=cplusplus] #include <iostream> using namespace std; cout<<"Enter a two-digit number: "; cin>>number; if(number>99) { cout<<"Number out of range"; …

Member Avatar for hermel
0
2K
Member Avatar for Knight_YUVA

Hi I want to create a plain c++ program which need to connect to SQL server through odbc and retrieve values and display it. I am using qt but i need it in plain C++ . can u anybody suggest the way to achieve it . and any free api …

0
60
Member Avatar for chumli

> 1) I need to make the game ask the player if they would like to play again and repeat if they choose yes. I have tried to add a loop in a few different ways but have not made any progress so far. > 2) When a letter is …

Member Avatar for chumli
0
296
Member Avatar for mohammed.salim91
Member Avatar for nathan.pavlovsky
0
103
Member Avatar for raliot

I'm trying to sort a deck with merge sort.I have all my code working except merge sort function . Any help would be really helpful ;) int temp; int br = 1; void push_l(int n); void push_r(int n); int pop_l(int &n); int pop_r(int &n); struct elem { int key; elem …

Member Avatar for raliot
0
293
Member Avatar for hamza233
Member Avatar for wael1sham

using turbo c++: write a program that converts the input dollar to its peso equivalent.Then display the peso equivalent.One dollar is approximately 45.119 pesos.

Member Avatar for NathanOliver
0
141
Member Avatar for writerervin

I was wondering how I would go about programming a gui toolkit from scratch. I would appreciate any and all help you could give me.

Member Avatar for Moschops
0
288
Member Avatar for exoruel

I thought I'm done doing mg activity, but my professor said that we need to use a Temporary Variable for Swapping and I have no idea where to put it. Mind giving me a hand, please? :( Here is his activity: Activity: Swapping Create a program that accepts a 10-element …

Member Avatar for exoruel
0
323
Member Avatar for asoud80

how can i Write a C++ program to display cities of USA using switch case newyork,virginia,texas,hollywood,chicago & newmexico

Member Avatar for wolfdragon
0
119

The End.