49,761 Topics
| |
Hey guys, I'm new here and just to let you guys know that i've just started programming in C++ and I also started web designing.. i've joined this forum to increase my knowledge and to seek help whenever I need and I am looking forward to it.. just a random … | |
Hi guys, good day! I have a question here pertaining to Visual C++ graphics based. I recently started out incorporating GUI into my C++ programs, in this case, a calculator. I have a textbox named TextBox1, the user enters the numbers and operators inside it, and when the button is … | |
Guys I need help. can you help me determine what are the things that i'll used to run my program like this: Enter 5 numbers but refuse to display if the value is an odd number. Display only even numbers and the sum of all even number. I'm not asking … | |
vector<vector<double>> v2d(2, vector<double>(3,0.0)); How later on reset all elements back to 0.0?. How to clear vec entirely, free memory?. Are there any performance degradation in using vector arrays verus conventionl arrays using new or malloc?.. What can be done to minize such degradation if any?. | |
A parking garage has 5 customers daily. The garage charges a $5.00 minimum fee to park up to two hours. The garage charges an additional $1.00 per hour for each hour (or part of an hour) over two hours. The maximum charge for any given day is $12.00. All cars … | |
Write a program that reads in a list of names and ages until the user enters "quit" as a person’s name. When the sentinel (quit) appears as the name, your program should display the name of the oldest person in the list and then terminate. For example, with the list … | |
Write a C++ program that performs the following task. A user is to be prompted for an integer value sum that is supposed to be in the interval 0 . . 99. If the value of sum is not in the proper interval, the only actions that should take place … | |
Hi, thanks for any help in advance. I was hoping to get some guidance for getting started with connecting to an SQL database online. I'm writing an application in Win32 which needs to be able to read/write to a database. I have plenty of experience with C++, but almost no … | |
Hello! :) I need to create a Question & Answer Program, just like "Who wants to be a Millionaire". So far, i am partially done with the code. It's just I am having problem regarding with lifelines. I need to make the 3 lifelines be used for only once. Really … | |
hey i got this program to calculate grades by reading from a file but im getting some error. can anybody help. #include <iostream> #include <fstream> #include <string> using namespace std; int highestGrade (int score1, int score2, int score3);// prototype for first function char letterGrade (int highscore);// prototype second function int … | |
Hi all, I would like to return an array of String variables from a C++ DLL to a VBA application. My understanding is that: [LIST=1] [*]To do so, the C++ function must return a SAFEARRAY of BSTR. [*]Although Excel uses BSTR containing wide characters (wchar_t), VBA itself uses BSTR with … | |
I declared two different char * and initialised them to the same string. but i thought they would be pointing to the different addresses , but they pointed to the same addresses.. How come this happens? char* arr = "abcdefgh"; char* brr = "abcdefgh"; cout<<arr<<endl; cout<<brr<<endl; the values printed out … | |
Hello, I have some questions I thought of searching the web and I would be eternally grateful for anyone to answer some of them. How to properly override the ostream operator? What exactly is big O notation? How to count primitive operations? Is there a way to see how much … | |
Average #include <iostream> #include <cstdlib> using namespace std; bool check(double element[], int count); int main() char redo; do { system ("cls"); double elements = 0, i = 0, j = 0, average_elements = 0; int k[1]; bool correct; cout<< "This program will show the average element of a sequence.\n\n"; cout<< … | |
#include <iostream> using namespace std; // Constant for the number of months const int NUM_MONTHS = 12; // Declaration of the WeatherInfo structure struct WeatherInfo { double rain; // Total rainfall double high; // High temperature double low; // Low temperature double averageTemp; // Average temperature }; int main() { … | |
Write, compile, and execute a C++ program to calculate the sum of the numbers from 1 to 100. The formula for calculating this sum is sum = (n/2)(2*a + (n-1)d), where n = number of terms to be added, a = the first number, and d= the difference between each … | |
Write a C++ program that generates a 7 character randomized password from the set integers 1 – 9 and A-Z. | |
| |
how to make uion and intersection of two variables using arrray | |
1. Total Purchase A customer in a store is purchasing five items. The prices of the five items are: Price of item 1 = $ 12.95 Price of item 2 = $ 24.95 Price of item 3 = $ 6.95 Price of item 4 = $ 14.95 Price of item … | |
so this is a checkout program. Hers my problem: the user enters 1 to enter checkout and then enters the PLU code followed by the weight of it or unit, then they have to choice to enter another PLU code or 0 to exit. Once the user enters 0 it … | |
how send a message with WM_DRAWITEM message? heres my actual code on parent window: case WM_DRAWITEM: { DRAWITEMSTRUCT *test=(DRAWITEMSTRUCT*) lParam; /*if(test->CtlType==ODT_MENU) { MENUITEMINFO menuInfo; menuInfo.cbSize = sizeof(MENUITEMINFO); menuInfo.fMask=MIIM_DATA; if(GetMenuItemInfo((HMENU)test->hwndItem,(UINT) test->itemID, TRUE, &menuInfo )!=0) { Menu *mMenu = (Menu *) menuInfo.dwItemData; if(mMenu!=NULL) if(mMenu->DrawItem!=NULL) //mMenu->DrawItem(); else { } } } else { … | |
Hello, I have a basic c++ STL question. I have an octet array class (legacy). Now lets say the octet array has the following contents: array[0]=00 array[1]=01 array[2]=30 array[3]=01 array[4]=114 The key we need to generate from the above array should match ["00130-1-114"] Whats the best way to get this … | |
Hey everyone! Thanks for all the help before and now I have another problem. So I'm doing a clock program with three "invalid" attached files. There are zero errors but still won't run the program, any advice out there? | |
write a program select an operation 1)innerproduct 2)matrix*vector 3)vector*matrix 4)matrix*matrix 5)transpose 6)exit how i wrote this with switch and for loop | |
Average #include <iostream> #include <cstdlib> using namespace std; bool check(double element[], int count); int main() Average #include <iostream> #include <cstdlib> using namespace std; bool check(double element[], int count); int main() { char redo; do { system ("cls"); double elements = 0, i = 0, j = 0, average_elements = 0; … | |
Hi, I am very new to CMake. In fact, I am trying this tutorial http://www.cmake.org/cmake-tutorial/. I do not understand some of the words prescribe there but I can manage. The problem I have with tutorials is the inclusion of TutorialConfig.h. I check the tutorial files and such file doesn't exist. … | |
can someone tell me whats wrong with it or what i should do? #include <iostream> #include <iostream> #include <string> #include <fstream> #include <vector> using namespace std; List storage[50]; int e = 50; int intro(void) { int userChoice; cout << "Enter 1 to checkout or 0 to end checkout."; cin >> … | |
So im doing an assignment for class and im not sure what/how to proceed, im struggling with storing randomly generated numbers in an array and then calling on them later to display how many times the random number has been called them. as you might notice i already have my … |
The End.