49,757 Topics
| |
Yawr please someone tell me about in C++ code of Tabulation Method for simplifying Boolean Expression | |
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; … | |
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; } … | |
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]; … | |
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 … | |
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" … | |
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 … | |
[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 … | |
//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' ) … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
help me please | |
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 | |
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 … | |
i want to build a mechanism in c++ can any1 help even for just links :( | |
how to write a program of functions accepting values and returning values? | |
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. … | |
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 … |
The End.