49,757 Topics
| |
create a program to print all prime numbers between 1 to 100. | |
* * * * * * * * * * * * Can anyone write a program to print this type of pattern? | |
Hello, I have a particular set up of cast operators and constructors which is leading to a compile-time ambiguity error. I am wondering if somebody can explain why this is happening and what can be done to fix it. For example, here we have 2 classes: class A { int … | |
cout << "Enter size of array: " << endl; cin >> size; cout << "Enter elements: "; for(i=0;i<size;i++) { cin >> array[i]; } | |
Does separation of interface from implementation within classes provide advantage? If yes, then how. | |
A PROGRAM IN WHICH WILL DECLARA VARIABLE WHICH HOLD A HOURLY WAGE AND NUMBERS OF HOURS WORKS.PROMPT THE USER TO ENTER VALUE FOR HOURLY RATE AND HOURLY WORKED.COMPUTE AND DISPLACE GROSS,WHICH IS CALCULATED AS HOURS MULTIPLY BY RATE FOR THE FRIST FORTHY HOURS,PLUS HOURS MULTIPLY BY 1.5 MULTIPLY BY THE … | |
for (int index = 0; index < 200; index++) { if(find_array[index] < minimums[0]) { minimums[0] = find_array[index]; //Lowest number cout <<"The index is " << index << endl; // trying to find an index } } for (int index = 0; index < 200; index++) { if(find_array[index] < minimums[1] && … | |
Having issues making a menu that will subtotal and then display a grand total. My professor is no help. It would be awesome if anyone can point me in the right direction. Because i have no idea why its not working. The program works fine until I get to the … | |
write a program to enter ten numbers and display the highest using array. | |
Everything works fine, but the outputted numbers are supposed to be asterisks instead of digits. Ideas? #include <iostream> using std::cout; using std::cin; int main () { int number = 0; char star = '*', stars = '*'; cout << "Please enter a base number to create the triangle: "; cin … | |
Okay so inside my ArcherArmor.cpp, I'm trying to figure out why the map initializer list isn't working, but for some reason I keep getting "Error C2593: 'operator =' is ambiguous". Here is my code: I also have a class which ArcherArmor is derived from, that has a struct called `Armor`, … | |
i wanted to show the magic of a digit nine to my friensd in c so any one plz help me | |
How do I use other libraries in C++? Specifically using the PDCurses library in the latest version of Visual Studio Express? What's the general way to set a libray up, how to use it? Thank you for your time and patience. | |
Hi, i'am a c# developer but I don't have much experience with c++. I'am curious if it is possible and how to add drad & drop functionality to a window of an external application. From my application I start an external application. I want to be able to drag an … | |
I am learning how to program with MPI and I can't seem to find an example anywhere about scattering two different arrays. Can someone point me in the right direction? I'll post some of my code below, that way you'll have an idea about what I'm trying to do. Thanks! … | |
HI ALL, I am trying to sketch the beging of function and the end, #include<ctype.h> #include<graphics.h> #include<conio.h> #include<math.h> #include<dos.h> #include<stdio.h> #include<stdlib.h> int xmax =1024;// getmaxx(); int ymax =760;// getmaxy(); float r,h;//??? int i; void grafica(){ //int gd=DETECT, gm; //initgraph(&gd, &gm, "..\bgi" ); initwindow(xmax,ymax, " Miscare "); setcolor(15); } float f(float … | |
HI GUYS I HAVE 2 WEEKS INTO THIS SUBJECT C++ AND OUR LECTURER HAS SINCE GIVEN US AN ASSIGNMENT.ONE OF THE QUESTION STATES; CONVERT THE FOLLOWING ALGEBRAIC EXPRESSIONS TO C++ a) M= A+B+C+D+E/5 B)Y=MX+B C)Z=PR+Q+W/X-Y D)Y=X(SQUARED)/B(SQUARED) E)Y=AX(SQUARED)+BX+C F)3(a+17) g)x+2=28 h) 50 n+5 =10 i)7x(squared)+4x-10 j)A IS NOT EQUAL TO B | |
Hi, In the legacy implementation, there is a Queue (which stored the PDUs) which need to be retransmitted. The queue has been implementated as stl map (c++). So the last element in the Queue may not be the largest SN, as per transmit window. Is there any easy way to … | |
This is something that I made a while back during thanksgiving 2007. If you want to add on to it you can, it's not very well made as in the organization sucks. But it is pretty cool in the fact that you can navigate your acii environ with color and … | |
I'm practicing my parsing, and I'm writing a program with an overloaded function that counts the words in a user entered cstring and regular string. Suprisingly the cstring was easy peasey but the string object is has me a stumped. I don't think my cstring was the most efficient solution, … | |
This code is supposed to randomly assign numbers to an array of structs, but isn't working at all. I have no clue why, everything looks fine to me, can some one take a look and tell me why it's crapping out on me? #include <iostream> #include <cmath> #include <cstdlib> #include … | |
Hello everyone im not very good with using pointers, maybe just need more explanation of using them/how i would change my code. Well i have to update this program i have to read in item number cost and qusantity from a file instead of getting it from the user. the … | |
#include <iostream> #include <iomanip> using namespace std; int main(); { cout << "***************************************... cout << "** Revenue for Bayou Broadway Theater **\n"; cout << "***************************************... const double balcony = 59.95; const double mezzanine = 99.95; const double orchestra = 139.95; int balconyTickets, mezzanineTickets, orchestraTickets; double balconyRevenue, mezzanineRevenue, orchestraRevenue, totalRevenue; // … | |
using a linked list in C++ i am attempting to delete a middle node from a series, and then put the series back together. ex: N1 -> N2 -> N3 N1 -> N3 delete N2 but i am getting a segmentation fault (core dumped) at the point in the code … | |
coding for printing diamond pattern using recursion as following * * * * * * * * * * * * * * * * | |
I have a text file i want to read data from the first line of the test file is ow many lines are in it then on each line seperated by a space is itemnumber itemprice itemquantity. 3 39284 5.75 12 18372 4.50 23 27649 12.99 81 how would i … | |
Someone please help thanks #include <sstream> #include <string> #include <iostream> #include <opencv\highgui.h> #include <opencv\cv.h> using namespace cv; //initial min and max HSV filter values. //these will be changed using trackbars int H_MIN = 0; int H_MAX = 256; int S_MIN = 0; int S_MAX = 256; int V_MIN = 0; … | |
Hi Guys, This is the first time I have just started with Keil C . Yet, I have no idea about this concept. Please clarify it for me. Thank you all. #include <stdio.h> #include "NUC1xx.h" #include "Driver\DrvGPIO.h" #include "Driver\DrvSYS.h" #include "Seven_Segment.h" #define SEG_N0 0x82 #define SEG_N1 0xEE #define SEG_N2 0x07 … |
The End.