49,761 Topics
| |
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 = … | |
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 … | |
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++' … | |
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 … | |
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. … | |
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. … |
The End.