49,761 Topics

Member Avatar for
Member Avatar for cessna172

[code] NODE *head; public: void push(int value){ NODE *temp = (NODE*) new NODE; temp->value = value; temp->link = head; head = temp; }//end of push. void pop(int&value) { NODE *temp = head; value = head->value; head = head->link; delete temp; }//end of pop. int is_empty(void){ return head == NULL; }//end …

Member Avatar for mrnutty
0
2K
Member Avatar for hey.howdy

[CODE] // absolute.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include<iostream> #include<string> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { int i=0, j=0,k=0,l=0; string yes1;bool outcome;int u=0,v=0,w=0; string arr[4 ][4]={{"Name","Plot #", "Cost", "Address"}, {"john", "1121", "Rs.1000", "62 johar TOWN LAHORE"}, {"jonty", "1123", "Rs.100000", "56 …

Member Avatar for thines01
0
317
Member Avatar for hey.howdy

// absolute.cpp : Defines the entry point for the console application. // [CODE] #include "stdafx.h" #include<iostream> #include<string> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { int i=0, j=0,k=0,l=0; string yes1;bool outcome;int u=0,v=0,w=0; string arr[4 ][4]={{"Name","Plot #", "Cost", "Address"}, {"john", "1121", "Rs.1000", "62 johar TOWN LAHORE"}, {"jonty", "1123", "Rs.100000", "56 …

0
100
Member Avatar for mc3330418

I have to take this program and make a header file, and implementation file, and a driver file. I wrote the original code and with all of the couts int the functions I can only put one function into an implementation file. [CODE] #include <iostream> #include <iomanip> using namespace std; …

Member Avatar for Ancient Dragon
0
206
Member Avatar for johans22

//use nib in Nibbler to set nib1, nib2, nib3. How the Nibbler and ABC get more efficient to send the Nbytes in ABC?. [CODE]union ABC { unsigned char Nbytes[4]; struct { unsigned short nib1 : 4; unsigned char NA1 : 2; unsigned short nib2 : 4; unsigned short nib3 : …

Member Avatar for L7Sqr
0
71
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
230
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
193
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
142
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
693
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
363
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
133
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
192
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
143
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
402
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
292
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
222

The End.