49,761 Topics

Member Avatar for
Member Avatar for azStudent

Why would I get a Segmentation Fault error? It compiles fine with g++, but gives an error when it runs. [code] void blowUp(char *board, int *boardSkin, int row, int column) { //set the board's 'skin' to 1, (meaning it will be displayed) *(boardSkin +(row * columns) + column) = 1; …

Member Avatar for azStudent
0
134
Member Avatar for Avaviel

Here is the [url=http://dl.getdropbox.com/u/297962/Lab7.zip]whole project[/url], in a zip file. I'm having trouble getting the delete function to work. I can delete head just fine, but when I try to delete either something at the end, or something in the middle, it does not work out. I'm sure it has something …

Member Avatar for Avaviel
0
111
Member Avatar for odonal01

HELP ME!!! /* Read from a file called “data.txt”. <ID> <Product> <Number ordered> <Manufacture Price> <Selling Price> Example Input: 1111 Dish Washer 20 250.50 550.50 2222 Micro Wave 75 150.00 400.00 3333 Cooking Range 50 450.00 850.00 4444 Circular Saw 150 45.00 125.00 */ #include <iostream> #include <fstream> #include <string> …

Member Avatar for VernonDozier
0
151
Member Avatar for star4ker

I am having trouble with this program which was solved before, but I am still having an issue with the final code. Here is the assignment prompt: Write a program that asks the user to order an ice cream treat. The user selects the type of ice cream, the type …

Member Avatar for seanhunt
0
4K
Member Avatar for slik33

So I made all the functions for a project where I was supposed to take input from the user through a menu and make an array and do various things with it. Two things I couldnt figure out were how to Lock and unlock the array, and then I also …

Member Avatar for Narue
0
121
Member Avatar for Nemoticchigga

I have an vs2005 forms application running a thread to constantly try and receive data via ethernet. My problem is once I get the data I want to pass it up through some object oriented layers. When I try to make a call to one of the layers sampleLayer->blah(); I …

0
89
Member Avatar for FREEZX

I need to make a program that will extract numbers from a file sorted like bowling cones, like this: 1 2 5 2 2 7 1 6 4 8 2 9 4 7 3 and than calculate the maximum a bowler can score if the ball can go down on …

Member Avatar for FREEZX
0
108
Member Avatar for winry

Hi, I've just started to learn vectors and wonder if there is a way to copy a vector that i use in main to a vector in a class??

Member Avatar for winry
0
81
Member Avatar for joed13k1941

Hey. Thanks for all of the help with my other questions. This forum has been very helpful. In this program, there is a note: "chocolate" may refer to either the ice cream or the sauce; assume it refers to the ice cream if an ice cream flavor has not yet …

Member Avatar for star4ker
0
439
Member Avatar for fox64

I've been wracking my brain over the last week. I have project due soon, but I'm having a lot of trouble with certain aspects of pointers in class instances. My project is to re-design the String class library by remaking basic functions. I was given a header file and told …

Member Avatar for fox64
1
92
Member Avatar for pdwivedi

i used following command to overcome edit-compile-run cycle while working with vim editor. :set makeprg=g++\ % then i ran the :make command every thing worked fine except that instead of jumping to the first error line in my file the vim editor shows that "[COLOR="Red"]type command or press enter to …

Member Avatar for pdwivedi
0
116
Member Avatar for seebharath

when creating a new xml file using xercesC++ all the attributes are ordered alphabetically at the output, how to see to it that the attributes are written in the order they are appended?? also how to associate with an xsd when creating a new xml with xerces C++

Member Avatar for Ancient Dragon
0
49
Member Avatar for Raschoc

I have been trying to compile my program but i get these error messages that i can't understand. Please help. these are the error messages I am getting error: could not convert 'MARITALSTATUS' to 'double&' error: in passing argument 2 of 'double FEDTAX(double, double&, int, int&)' err: In function 'double …

Member Avatar for Raschoc
0
119
Member Avatar for Mossiah

[CODE] #include "stdafx.h" #include <iostream> #include <iomanip> #include <string> using namespace std; char your_string[256]; char new_string[256]; void ReverseString(); int main() { char choice; do { cout <<"Enter the string that you want to reverse: \n"; cin.getline(your_string, 256); ReverseString(); cout << new_string << "\n"; cout <<"Do you want to continue? Press …

Member Avatar for Narue
0
71
Member Avatar for Lenny19

Hi, I have to display the details inside an array as a bar chart, the user has input the temperatures for the twelve months, here is the declaration and the user input: [CODE] int temp[12]; int menuChoice; char month[12][5]={"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};[/CODE] …

Member Avatar for Narue
0
110
Member Avatar for maru2

I am new to C++ and would like to know what style I should use to write my codes. For example, should I use: [CODE=c++] for (int i=0; i < 10; ++i) { cout << i << endl; } [/CODE] or [CODE=c++] for (int i=0; i < 10; i++) { …

Member Avatar for Narue
0
116
Member Avatar for cppStudent

I can't understand why there's a memory leak. Can someone please enlighten me ? [CODE=cpp]#include <fstream> #include <string> #include <iostream> #include <sstream> #include <stdlib.h> #include <math.h> using namespace std; class ChocBar{ public: ChocBar(string name = "Barone",double price =1.20){ name_ = name; price_ = price; } string getName(){ return name_; } …

Member Avatar for Agni
0
86
Member Avatar for homeryansta

I'm trying to write a a program that simulates a multi queues, multi server such as a grocery line at the grocery store. The user will enter the desired number of queue/server pair. how would i write this? I mean, I can have 3 - 4 different queue stacks as …

Member Avatar for homeryansta
0
132
Member Avatar for Takafoo

Reverse the case of all alphabetic characters in the string. That is, all upper case characters become lower case and all lower case become upper case. Hello World becomes hELLO wORLD. So I figured I need to use the toupper and tolower commands. I'm just not to sure how to …

Member Avatar for Takafoo
0
66
Member Avatar for wonder_laptop

hello there, can anybody please give me an example of how to use hashtables to implement a memory in cpp.. i surfed the net for 2 hours and couldnt find anything :S im not sure whether im submitting the right queries. thank you.

Member Avatar for VernonDozier
0
74
Member Avatar for Brandon515

ok well first of all i was going to use "a push in the write direction" for the title but i decided it was too stuid haha anyway umm as I am one for pointless trivialities i want to code a program that rains streaming data from the top of …

0
60
Member Avatar for blackbyron

Hello, i have a question for my C++ program. void GasPump::setHighGal(int gallons){ gallons = 0; } void GasPump::setMedGal(int gallons){ gallons = 0; } void GasPump::setLow(int gallons){ gallons = 0; } Those functions will sets the quantity of gas in the indicated tank to parameter value,resets total cash for that type …

Member Avatar for blackbyron
0
96
Member Avatar for theseed

Hi, Does someone know about drawing a window in a Memory Device Context, I need this so I can then read pixels from a window that is behind other windows. I need this for windows XP, not Vista. Thx in advance.

Member Avatar for William Hemsworth
0
33
Member Avatar for neelima156

Hi There, I have to do this read a list of names from an input file of my own, In main() I declared a Namelist[][] object, read several names from thefile using redirection and then print out the list. I have to add the name to the list only if …

Member Avatar for neelima156
0
129
Member Avatar for wonder_laptop

i want to implement a memory using c++ language. the memory will contain addresses of length 64bits because in my architecture the word is 64 bits. i want to implement it using a set associative array. so i want to create a 2 dimensional array of dimension 8 and 16k …

Member Avatar for Zcool31
-1
86
Member Avatar for sid78669

I have a function which outputs a really long string in a box of defined size. The problem is, after a few lines, I get an error saying that HEAP CORRUPTION has occured and I wrote to a memory beyond the allocated limit. Now, I'm only writing to console and …

Member Avatar for sid78669
0
191
Member Avatar for Mahsa_C++

hello every one here, hoping u're all doing fine. i am face with a wierd error while trying to encode a class about courses and students ( student is itself a class) i'm give this error, and googling seems of no help! [COLOR="Red"]error C2784: 'bool std::operator <(const std::pair<_Ty1,_Ty2> &,const std::pair<_Ty1,_Ty2> …

Member Avatar for Mahsa_C++
0
93
Member Avatar for bluebird

Hello! I am writing c++ program on linux. Whenever I read a char or string, I got problem. In c, I sove the problem using if(getchar()=='\n') in c++, how can I sove that problem? Here is my program. I cannot do any input for name. Please help me. [code] #include<iostream.h> …

Member Avatar for tux4life
0
96
Member Avatar for abby2589

[TEX]can someone teach me how to use pointer in this program?? i dont know if what i did in this program is correct. can you tell me how to use pointers here.thanks! [/TEX] [CODE]#include<stdio.h> #include<iostream.h> struct fruits { int apple; int banana; int orange; int jackfruit; } fruit; int shape; …

Member Avatar for tux4life
-2
152
Member Avatar for aidy

[TEX]quick question, I can't figure out how to change the position doing it this way. It isn't changing position.[/TEX] [CODE] this->a1->Location.X = this->a1->Location.X + 20; this->a1->Location.Y = this->a1->Location.Y + 20; [/CODE]

Member Avatar for tux4life
0
83

The End.