49,757 Topics

Member Avatar for
Member Avatar for paintballer1518

Currently having trouble completing my code homework for my class. Help would be greatly appreciated. Write a menu-driven C++ program to manage employee data. Your program should begin by reading in a file of employee information (filename employdata.txt). Each data line contains the following information: {hire date} {employee ID} {salary} …

Member Avatar for paintballer1518
0
2K
Member Avatar for ThomsonGB

Without the complete context to summarize: [CODE] #include "stdafx.h" #include <iostream> #include <fstream> #include <string> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <objbase.h> using namespace std; BYTE* StringToGUID(LPOLESTR szBuf) { GUID *g = (GUID *) malloc( sizeof(GUID)); HRESULT h2 = CLSIDFromString(szBuf, g); return (BYTE*) g; } [/CODE] I Get: 1>Linking... …

Member Avatar for ThomsonGB
0
2K
Member Avatar for infogirl

I have written the program which fills an array of structures and then writes that array to txt file. The problem is that my program terminates in unusual way on windows vista command prompt line but dev-C++ shows no errors when compiles. I think that is related with the number …

Member Avatar for triumphost
0
229
Member Avatar for Rupindersingh

The following code is supposed to read records from input and store them in a file called file.dat. Then it is supposed to arrange these records in ascending order, but for some reason the program hangs at line no.61. Can someone please tell me what's wrong? #include <iostream> #include <fstream> …

Member Avatar for Rupindersingh
0
137
Member Avatar for joseph_butler

I have written the following code to try to get my GPA calculator program to work. I am not allowed to use arrays. I only know what I am doing from the videos I have watched on youtube and the slideshows that we get from our instructor. Unfortunately, the slideshow …

Member Avatar for absar.mazhar
0
4K
Member Avatar for justanoob

hello guys, im having trouble on how to approach this assignment i have for my c++ class, please i would appreciate all kinds of help and advices. thank you in advance. The game is a one to three players dice game. At the start of the game there are nine …

Member Avatar for Lerner
0
192
Member Avatar for garu525

Hello, I need some advice on how this function outputs the left zeros so everything will be even at 16 bits [CODE]string conv (int num, int base) { if (num == 0) return "0000000000000000"; char NUMS[] = "0123456789ABCDEF"; string result = ""; do { result.push_back (NUMS[num % base]); num /= …

Member Avatar for histrungalot
0
141
Member Avatar for BryantFury

Hi im currently doing some work with arrays and ive been working on this program. The goal is a user can add up to three products. Each product will have a name, model number and price. Once all is entered a list will pop out showing all the products with …

Member Avatar for BryantFury
0
127
Member Avatar for skyline2425

Hi, I'm a beginner in C++ and working on my lab assignment. I get the following error, please help. Thanks, Skyline error C2676: binary '+=' : 'Time' does not define this operator or a conversion to a type acceptable to the predefined operator // Function - CalculateTotalCollectionPlayingTime() Time MediaCollection::CalculateTotalCollectionPlayingTime() { …

Member Avatar for thines01
0
4K
Member Avatar for triumphost

Why does my delete function crash? I've used the same algorithm for other 2D vectors and it works perfectly fine.. I'm trying to remove an array of vectors from a 2D vector all of the std::string type. [CODE] //Ripped out of a massive class I wrote. vector<vector<string>>& Delete(vector<string> StringArrayToDelete, bool …

Member Avatar for histrungalot
0
691
Member Avatar for utkarshsahu

I wrote a simple program to take input till the char array is filled up. But i seem to be getting a problem during runtime that the program takes input continuously and never stops. Pls help in identifying the problem.(there were no errors during compiling) [CODE] #include<iostream> #include<string> using namespace …

Member Avatar for Laiq Ahmed
0
163
Member Avatar for mehdimughal

I need help with this code Constructer is abnormally called again n again.... add these file 2 a project n run ...i've given given constant messages in da code to explain the problem! Hit (1) two tyms i.e GetInput function in da menu.... u'll get 2 knw wat da problem …

Member Avatar for jbennet
0
201
Member Avatar for creative_m

I am trying to compile NeHe code for win32 app in visual studio 2010. but this error appear: [CODE]cannot convert parameter 2 from 'const char [29]' to 'LPCWSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast[/CODE] to these instructions [ICODE] if (!wglMakeCurrent(NULL,NULL)) // Are …

Member Avatar for creative_m
0
376
Member Avatar for Nawaf15

Hi everyone, I have written this code which can find the square root of a positive number using newtons method. The code below describes it all. Now, I just need to know how can I show each iteration of the loop? like I wanna out each iteration until the final …

Member Avatar for Eagletalon
0
355
Member Avatar for Kob0724

I'm not sure if this is the best place for this thread, but it's the best I could come up with. I'm using a QT Style Sheet to style a radio button like this: [CODE] QRadioButton{ background:#5F7536; color:#CBF57D; font:bold; } [/CODE] It works fine except that in addition to changing …

Member Avatar for naresh4230
0
3K
Member Avatar for shamara

please m I want help , I am a new member I dont know How I use this site , I attached some problem and I want help :)

Member Avatar for shamara
0
132
Member Avatar for 2hop260

Now before you give me a knee-jerk "do your OWN homework we-won't-help-you-cheat" reaction, please read this all the way through. My homework assignment is to write a Caeser Cipher (from my understanding its very common for professors to give this assignment) and I have that done (with some help from …

Member Avatar for 2hop260
0
754
Member Avatar for anton_f

I have to find factors of 1-10 then count all factors and find if they are odd/even. I know how to find if they are even or odd i just can't count how many factors for each number. #include <iostream.h> #include <stdlib.h> int main() { int num, icntA, icntB, icntC, …

Member Avatar for anton_f
0
191
Member Avatar for johanjvanr

Hi all I have a list of 20 numbers and I have to write a program that takes the first 3 numbers, calculate the median and shoots out the median in table format. Then the program takes numbers 2,3,4 and calculate the median and shoots it into a table. Then …

Member Avatar for BobS0327
0
141
Member Avatar for MrEARTHSHAcKER

Hi, I have made some sorting function based on finding largest element and swapping its place with last element of array and then searching largest element of rest of array and putting it on one place before last one and so on. I am curious about is there a name …

Member Avatar for MrEARTHSHAcKER
0
371
Member Avatar for butler273

So, I'm back once again. This week I'm having issues with efficiency in a Radix Sort Algorithm. From what I understand this is the foundation of this algorithm. What operations might be costing me? For the basics I suppose I do understand push_ back being costly having to copy the …

Member Avatar for butler273
0
259
Member Avatar for ThomsonGB

I am getting an access violation. Can anyone see why this might occur in the following code fragment from a GUID generator? [CODE] // here is a code fragment fro a GUID creation routine. // it is crashing with an Access violation #include <iostream> #include <fstream> #include <string> #include <stdio.h> …

Member Avatar for rubberman
0
627
Member Avatar for chueymtz24

I am interested in changing my major in college and also making a career switch, I would like some advice if anyone can provide it, I'm not super smart nor do i know too much about computers but i work with them as an AutoCAD Tech for an engineering firm …

Member Avatar for Josh12
0
162
Member Avatar for ChrisMackle

So im using the source code off a tutorial to learn and add a feature to drop a block. Ive learned so much so fra but now ive come to a dead end! You move with the arrow keys- works You press space to show the block- doesnt work heres …

Member Avatar for rubberman
0
323
Member Avatar for nuclear

So the function: [CODE]glLoadIdentity();[/CODE] resets the matrix, so for instance we do this: [CODE]glMatrixMode(GL_PROJECTION); glLoadIdentity();[/CODE] how exactly does this work, it seems that we set the matrix and then just return it to the way it used to be.

Member Avatar for Labdabeta
0
221
Member Avatar for TheNewKid

Hello guys! I am new to this forum and would like to start off by saying hello to all of you! I have wanted to start learning C++ for a while now but I have never found a way to get on my feet when programming C++. I need to …

Member Avatar for TheNewKid
0
91
Member Avatar for LdaXy

I know that the colon is used for inheritance. [CODE] class x { public: long y; } class Z : X { public: virtual void ret_value(y); }[/CODE] but what does this mean? [CODE]int offset:16;[/CODE] i cannot find he answer to this anywhere.

Member Avatar for LdaXy
0
213
Member Avatar for Crashley2010

I have a programming assignment I've been having a lot of trouble with. Here is the question. Its long, I know. Design and write an object-oriented program for managing inventory bins in a warehouse. To do this you will use tow classes: InvBin and BinManager. The InvBin class holds information …

Member Avatar for Crashley2010
0
567
Member Avatar for frogboy77

I recently started using Code::Blocks and have written a small program to read in from a file. I think the problem i am having is the file not being found. Where does the IDE search for the file and how would i change this? Can i just input the whole …

Member Avatar for TheNewKid
0
249
Member Avatar for hey.howdy

Hi Can anyone please help me understand and so possibly illustrate with an example why and how a function cant return or evaluate more than one value ?

Member Avatar for zeroliken
0
96

The End.