49,761 Topics
| |
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; … | |
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++) { … | |
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 … | |
Write a program that inputs basic salary and calculates 35%dearness allowance'25% house rentand then displays the gross salary. | |
(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' : … | |
[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 … | |
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? | |
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' ? … | |
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 … | |
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, … | |
please help me identify the objects,their relations (Association, aggregation and Composition) of a university ? | |
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> … | |
how can I use it ?? and how can I allocate and intialize it ??? | |
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 … | |
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? | |
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 … | |
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) … | |
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("* "); … | |
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 … | |
how to create dynamic object array with over loaded constructor call plz help and tell me the syntax ... | |
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"; … | |
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 … | |
> 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 … | |
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 … | |
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. | |
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. | |
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 … | |
how can i Write a C++ program to display cities of USA using switch case newyork,virginia,texas,hollywood,chicago & newmexico |
The End.