49,757 Topics

Member Avatar for
Member Avatar for Arzoo Malik

Yawr please someone tell me about in C++ code of Tabulation Method for simplifying Boolean Expression

Member Avatar for tinstaafl
0
69
Member Avatar for cannon_1

Currently, I have a c++ program to call an external program, wait for it to finish, and return the string that was supposed to print on the screen by the external program; string result_now=exec("./CCLS_to_akmaxsat "+softer_filename); std::string exec(std::string command) { //cout << "\n\nEvaluating command: " << command << "\n\n" << endl; …

Member Avatar for tinstaafl
0
330
Member Avatar for cambalinho

i did 1 code for give me the menu position. but i'm getting problems compare the LPSTR or LPCSTR with string :( int GetMenuPosition(HMENU menu, string caption) { int i=0; for(i=0; i<GetMenuItemCount(menu)-1;i++) { MENUITEMINFO s= {0}; s.cbSize=sizeof(MENUITEMINFO ); s.fMask=MIIM_STRING; s.cch=strlen(strCaption.c_str()); //s.dwTypeData=(LPSTR)strCaption.c_str(); GetMenuItemInfo (menu,i, true, &s); string b=static_cast<char*>(s.dwTypeData); if(b==caption) break; } …

Member Avatar for cambalinho
0
852
Member Avatar for abdalimran

I've written the following program..but it doesn't work. Why? It shows an error: `cannot convert ‘std::string* {aka std::basic_string<char>*}’ to ‘std::string** {aka std::basic_string<char>**}’ for argument ‘1’ to ‘void print(std::string**)’|` #include <bits/stdc++.h> using namespace std; void print(string *ar[]) { for(int i=0; i<5; i++) { cout<<*ar[i]<<endl; } } int main() { string s[5]; …

Member Avatar for NathanOliver
0
295
Member Avatar for MasterHacker110

I'm trying to create a very simple enigma machine cipher. But mine doesn't decrypt the data correcly. #include <iostream> #include <string> using namespace std; const char alphabet[27] = { "ABCDEFGHIJKLMNOPQRSTUVWXYZ" }; const char reflector[27] = { "WSXRFVYHNIKPQAZEDCTGBUJMOL" }; const char rotors[27] = { "QWERTYUIOPASDFGHJKLZXCVBNM" }; /* Get the position of …

Member Avatar for tinstaafl
0
304
Member Avatar for rayhaneh

I'm new at C++ ..and I dont know what should I do whith my program ... this program's input for exg. is: 5 mary sara kimi lili olive : : and then sorting them .. but my problem is that when I submit my home work they score me "0" …

Member Avatar for rayhaneh
0
224
Member Avatar for MrSchmutz

Hi.I'm 16 years old and i am studying c++ at highschool.The thing is i really think what we do at class is really...useless(and easy). I mean i don't think it will help me a lot if i want to create an application... What should i learn? Where from? What do …

Member Avatar for Anton_4
0
251
Member Avatar for happygeek

[ATTACH=RIGHT]22389[/ATTACH]CodeToGo is, essentially, an API wrapper around the Ideone.com online compiler and debugger that enables you to use it to compile and run code in around 50 different programming languages on your iPhone or iPad. It has been around for a while but has always been somewhat tarnished with the …

Member Avatar for Anton_4
3
875
Member Avatar for aluhnev

//Hi all,could someone explain the make_shared(), is it used to substitute constructor? //Here is an example void DoAddStaff(vector<Ptr>& container) { cout << "\nEnter type of employee to add ('W' for waged, 'S' for salaried): "; char c; cin >> c; cin.ignore(); if( c == 'w' || c == 'W' ) …

Member Avatar for vijayan121
0
248
Member Avatar for webwebcpp

The program, which you will write, will be a console application of C++ and will read the file.txt file while separating the hidden countries and cities when it starts to work. Sample file (This is only a sample file, your program must read much longer files) Uruguay# Montevideo The USA …

Member Avatar for Maritimo
0
164
Member Avatar for Deepesh_1

I know how to get min and max value in a vector through iterators as shown below, But how about getting a min and max value of a matrix table in vectors of vector: for example i have: `vector<vector<float> > vec;` the above vector has a matrix (my program reads …

Member Avatar for Taywin
0
3K
Member Avatar for orgy147

According to your variant write a program. That program reads a sequence of positive numbers from standard input. The sequence is terminated by number 0 and does not include that 0. For each number in sequence program should create a new thread. The thread gets some how the value of …

Member Avatar for L7Sqr
0
107
Member Avatar for Natty_1

According to your variant write a program. That program reads a sequence of positive numbers from standard input. The sequence is terminated by number 0 and does not include that 0. For each number in sequence program should create a new thread. The thread gets some how the value of …

0
74
Member Avatar for senait.kifle.127

Hello Guys, so I have this question today. let's say I defined a structure like this : struct List{ char *co; char *di; List* next; }; I wanted to define a function with a pointer to a list of elements of this structure as a parameter. In the body of …

Member Avatar for NathanOliver
0
250
Member Avatar for senait.kifle.127

My Objective is to define a function, with a pointer to a list of elements of the structure I created as the first parameter, a C-character string (of type char * ) as the second parameter and one of the of the two values,num or name, from the above enumeration …

0
177
Member Avatar for Maritimo

One of my students make me a question (which answer i know) but I think could be instructive to formulate the same question here so many people can learn about it. The question is: How to implement a copy assignment into a Derived class? Consider the following class A: class …

Member Avatar for pritaeas
0
390
Member Avatar for amal.mohammed.7505

A. Write a value‐returning function called length() that takes a positive integer and returns the number of digits in that integer. B. Using the written function in part A, write a value‐returning function called ispalindrome(), while 5675 is not palindrome. The function takes a positive integer and returns true if …

Member Avatar for jencas
-1
256
Member Avatar for aliaune
Member Avatar for justzamir

I am totaly new to C++, and i am trying to get sum of two digits, but i am getting some error, will somebody please correct my code. Regards

Member Avatar for jencas
1
336
Member Avatar for geko.villegas

GUYS CAN YOU HELP ME WITH MY PROJ?? ARP ARP Talk is a fun variation of the English language. The conversion to ARP ARP is carried out as follows: 1. When a vowel or vowel sound (a, e, i, o, u, or y as in why) is found, arp is …

Member Avatar for deceptikon
0
83
Member Avatar for Mamy.Dad
Member Avatar for shayan_doust
0
99
Member Avatar for abuamidat
Member Avatar for maria.javed.3990
Member Avatar for theashman88

Hi I got a quick question. Is there any way i can change the background color and the text color within my compiler of dev-c++. I'm not trying to change the color of the output when I run the program, I'm talking about the actual code itself and its compiler. …

Member Avatar for nullptr
0
6K
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
145
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

The End.