49,757 Topics

Member Avatar for
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
134
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
244
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
357
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
319
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
584
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
88
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
130
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
Member Avatar for frank731tr

Basically I need to writed a program that asks for a double and if the user inputs something keep going, but if the user just presses enter then the program should end. The problem is i can't get it to do anything after the person presses inter eg double value; …

Member Avatar for mrnutty
0
2K
Member Avatar for c++coder

Hi. I was wondering if someone could help me out with a project. The assignment says to call a void function called InsertIntoArray passing the array, the entry the user entered and place the positive integer into the correct element of the array so that the array is always in …

Member Avatar for c++coder
0
1K
Member Avatar for lgonzo

am new to c++, and am having trouble with if else statement for this code i am writing a program that makes the computer guess a number you the user has choosen my program works fine, but when i get in trouble is when my range gets down to zero …

Member Avatar for lgonzo
0
106
Member Avatar for lgonzo

beginning in c++, i have a question of a recent program for this program i am trying to create a game where the computer try's to guess a number 1-100 that the user has chosen and i have it running good. but where i have a problem is at the …

Member Avatar for lgonzo
0
87
Member Avatar for Tinee

Im trying to make a C++ program to calculate the resistance in a parallel electric circuit. The formula is Total = 1 / (1/resistor1)+ (1/resistor2).... + (1/resistorN) I have made the program however when I compile it it has the "linker error" Can you please help me spot the mistake …

Member Avatar for Ancient Dragon
0
280

The End.