49,761 Topics

Member Avatar for
Member Avatar for rayhaneh

I find a code that sorting the names and at this program shouldnt be difference Between "a" and "A" and my Question is what does line 20 said ..!? #include <iostream> #include <string.h> #define MAXNAMES 100 using namespace std; int compare(string s1, string s2){ int i; for ( i = …

Member Avatar for rayhaneh
0
271
Member Avatar for Betty96

Implement a C function that can perform addition of two 15-digit (positive) integers. As in C the maximum integer number that can be stored in memory is 2147483647 it is not possible to use primitive data types in order to add very large whole numbers. For this reason, you are …

Member Avatar for David_50
0
187
Member Avatar for alexandar.valentinov

As you probably know 'C++' doesn't allow either passing or returning arrays by value (don't mislead yourself that declaring array parameters will give you that functionality, every parameter declared as array will be 'adjusted' to a pointer to it's first element - which is some kind of odd, but 'C++' …

Member Avatar for mike_2000_17
1
175
Member Avatar for EarlZhaoy
Member Avatar for andruluchko

Hello. I have to print information (Full name. date of birdth, count of children) using output operator overloading. But i get two errors: "no instance of constructor matches the argument list" and "cannot convert from int to int". I have to use public and private modificators too. Can you show …

Member Avatar for Moschops
0
185
Member Avatar for bballmitch

Alright, so im making falling numbers and i need to display points while its running. in the code its keeping track, but i have no way of displaying it. in regular C++ i would just do cout<<score; but in openGL it doesn't work that way as most of you know. …

Member Avatar for TWAT
0
2K
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
332
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
855
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
879
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
108
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
394
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
337
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
7K

The End.