49,761 Topics

Member Avatar for
Member Avatar for israruval

Ok so im trying to implement a stack using vectors in C++ i just want to know if the following implementation code makes sense, this is just the implementation file, the client file is working fine but when i run the program it doesnt work so i believe it has …

Member Avatar for israruval
0
1K
Member Avatar for plang007

I really need help in writing this program for homework. 1. Round the average for each student to the nearest integer. 2. Add code to print out an appropriate message for each student. (given in prologue comments) 3. Add code to calculate the highest student average, and the lowest student …

Member Avatar for ravenous
0
258
Member Avatar for Derek Elensar

Okay. I have said code: [code=C++] #include <iostream> int main() { std::cout << "This is a native C++ program\n" << std::endl; return 0; }//main [/code] How would I compile this from a standard DOS command line? I've searched all over google, and have yet to find an answer that explains …

Member Avatar for user422
0
341
Member Avatar for Transcendent

I have a flow on how to do this program but I need so help.[COLOR="Red"] [B]PLEASE GIVE ME A HINT NOT THE ANSWER. [/B][/COLOR] [B][COLOR="Red"]THE FLOW CHART IS IN THE ATTACHMENT. PLEASE CHECK IT OUT BEFORE GIVING HINTS[/COLOR][/B] [CODE]/*************************************************** The following program will take user's input and check whether it …

Member Avatar for mike_2000_17
0
456
Member Avatar for JaviP

Hello, I would like to know what am I missing in this program to be getting that error. Thanks in advance! Error is [B]error C3861: 'setprecision': identifier not found[/B] [CODE]#include <iostream> using namespace std; int main () { int numFloors=0, numRooms=0, numOccupied=0, totRooms = 0, totOccupied = 0, totUnoccupied=0; double …

Member Avatar for Fbody
0
6K
Member Avatar for Rapidee
Member Avatar for skinwah

Hi all. I am trying to create a program to take in records of a companies payroll. I get the data then write it to a binary file. When I want to delete a record I ask for the specific timesheets name and the employee ID then read the file …

Member Avatar for skinwah
0
139
Member Avatar for Zvjezdan23
Member Avatar for FrancisLazo

I am a puzzled regarding the purpose of the countDown = coundDown -1; part of this program code. I mean I do not know why I should subtract the countDown by 1. What is it for??? Here is the program source code, the one highlighted is the one I'm confused …

Member Avatar for spoonlicker
0
136
Member Avatar for spoonlicker

I've read explanations but to no avail. Could any one offer some explanation of what the difference is and what the benefits are of typedef, struct and classes?

Member Avatar for Narue
0
1K
Member Avatar for fish234

Hey, I was wondering what the code was to open a program using C++? so basically writing a program that opens a program. any help would be great :)

Member Avatar for Narue
0
300
Member Avatar for Mr68360

Most examples of the select() function use a 0 to 'max file descriptor value' approach: [CODE] fd_set master_fd_set; FD_ZERO(&master_fd_set); fd_set temp_fd_set; FD_ZERO(&temp_fd_set); int max_fd = the_max_file_descriptor_value_of_descriptors_interested_in; ... temp_fd_set = master_fd_set; ::select(max_fd, &temp_fd_set, NULL, NULL, NULL); for (int i = 0; i <= max_fd; ++i) { if (FD_ISSET(i, &temp_fd_set)) { // …

Member Avatar for nezachem
0
245
Member Avatar for JaviP

Here is the program that I have to make: Write a program that asks the user to enter the amount that he or she has budgeted for a month. A loop should then prompt the user to enter each of his or her expenses for the month, and keep a …

Member Avatar for Narue
0
629
Member Avatar for daniel1977

The class dateType in my program was designed to implement the date in a program. However, the function and constructor don’t check whether the date is valid before storing. … rewrite the definition of the function setDate and constructor so that the values for month, day, year are checked before …

Member Avatar for Narue
0
358
Member Avatar for Muhammadlodhi

Hi i made a program for conversion decimal to binary number ... but i need to convert the big dottef number into dotted binary like this For example 10.10.0.13 is <00001010.00001010.00000000.00001101> 8-bit of every integer .. This is making me confuse how to make it ? my conversion code is …

Member Avatar for VernonDozier
0
1K
Member Avatar for Muhammadlodhi

Hi . I am coding the following program i will give the string my self and one is already given. given string = {a,b,c,d,3,f,g,h,i,6,j,k,l,m,9,n,o,p,q,2,r,s,t,u,v,w,x,y,z }, you are required to process an input string possibly less than 80 characters long, and an input +ive integer to encrypt the message: for example: …

Member Avatar for Muhammadlodhi
0
2K
Member Avatar for BenjyC

Hi, I am working on a piece of OOP which needs to be ran entirely by classes, by that meaning the main function should only create the first class and the rest of the program ran by member functions of various classes. Part of this task requires me to keep …

Member Avatar for BenjyC
0
177
Member Avatar for kitty.naz

I m work'n on a project to control the cursor with my finger. I've used openCV in VC++ to track my finger but have no idea how to link the mouse with my finger i.e control the mouse motion with finger. can someone please....!! tell me how do you control …

Member Avatar for kitty.naz
0
193
Member Avatar for anXieTy

Hi there, i am desperately trying to compile the MySQL++ library header & cpp files in order to create the actual lib. I do follow the exact instructions given in the ReadMe for MinGW. [ICODE]Prerequisite: MySQL C API DLL Import Library ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Before you can build MySQL++ with MinGW, you …

Member Avatar for Stefano Mtangoo
0
2K
Member Avatar for neilelph

I am trying to use an exported function from a C++ dll with the below signature, from within my C# program. [CODE=C]extern "C" __declspec(dllexport) BOOL S_USB_Memsize(unsigned char *buffer)[/CODE] In my C# code , I am declaring the use of this function with: [CODE=C][DllImport("RSTUSBIF.dll",CallingConvention = CallingConvention.Cdecl)] public static extern int S_USB_Memsize(IntPtr …

Member Avatar for neilelph
0
320
Member Avatar for dyingatmidnight

Hello, first I want to say I'm a total noob to C++ and Visual Studio and MFC. Before this I studied Java in school. Anyway I'm required to learn MFC for work and I've been going through a reference book my supervisor has and I've run into an error that …

Member Avatar for Ancient Dragon
0
585
Member Avatar for qwerty05

how can i do this ? the error was lvalue required. [code]#include<iostream.h> #include<sting.h> #include<conio.h> #include<stdio.h> struct movies_t { char title[50]; int year; } mine, yours; void printmovie (movies_t movies_t); main () { clrscr(); struct movies_t mine, yours; mine.title="The Curious Case of Benjamin Button"; mine.year=2008; cout<<"Enter title:"; gets(yours.title); cout<<"Enter year:"; cin>>yours.year; …

Member Avatar for rxlim
-1
89
Member Avatar for cppgangster

Hi, I want to learn mfc, but as I read in wiki mfc is not included in visual express editions, IS THE ONLY WAY TO LEARN MFC is buying visual studio software? are there any other solutions?

Member Avatar for Moschops
0
132
Member Avatar for fsefsef23

If I want "3x²" to be output in my program, and I have a variable holding the "3" as float coeff and one holding the "2" as int expn, how do I go about displaying the polynomial using cout? Do I need #include<cmath> as well? thanks in advance. Jess

Member Avatar for jonsca
0
152
Member Avatar for surferxo3

[CODE] #include <iostream> #include <iomanip> using namespace std; int c0=0,c1=0,c2=0,c3=0,c4=0,c5=0,c6=0,c7=0,c8=0,c9=0; class array{ private: int arr[10]; public: friend istream& operator >> (istream& in, array& a) { cout<<"Enter 10 value in the array!\n\n"; for (int i=0; i<10; i++) { cout<<"Enter the value at ["<<i<<"]: "; in>>a.arr[i]; } } void check_count (void) { …

Member Avatar for surferxo3
0
120
Member Avatar for frank731tr

I would like to convert a C++ string that the user inputs to a c string. The problem is I have no idea how long the c++ string will be and i know the c string has to have one extra space for \n. Is there a way to apply …

Member Avatar for jonsca
0
298
Member Avatar for fsefsef23

Can I declare an array variable as "int a[]", as in an array with no specified amount of elements to hold initially (to be determined later with a index variable)? I am writing a program that relies on a file whose contents are read into the array, but the file's …

Member Avatar for ninjatalon
0
145
Member Avatar for Tommybb

I am beginning C++ programmer, I have been taking my c++ class for about 5 months now and this is the first time I have been completely stumped and I know for a fact it wont be the last. My professor assigned an assignment for us to find the mean, …

Member Avatar for G-Dog
0
14K
Member Avatar for rogba

Write a C++ program that declares an array alpha of 50 components of type double. Initialize the array so that the first 25 components are equal to the square of the index variable, and the last 25 components are equal to three times the index variable. Out the array so …

Member Avatar for arkoenig
0
46
Member Avatar for trail453

hey guys. i have a very simple programming assignment. i have a little experience in c++ but the code that im using is not working. the assignment is to use an array to enter 10 numbers and then print them out in reverse order. the following code that i am …

Member Avatar for trail453
0
129

The End.