49,755 Topics

Member Avatar for
Member Avatar for ARYT

It's me again. :?: This is the question: Write a computer program that computes the temperature of a gas that is originally at P=5 atm, =V30 Liters, T=273 K. Solve the problem using one dimensional array only. Assume number of array elements is unknown (use the end of file function). …

Member Avatar for Ancient Dragon
0
216
Member Avatar for f.ben.isaac

[CODE] const char* findThisMsgInMem = "Hello World! Everyone is Happy"; if(memcmp(&dataInMem[i], findThisMsgInMem, defaultMsgSize) == 0) { memcpy(&dataInMem[i], newMsg, strlen(newMsg)); //more code here }[/CODE] This is first time for me trying to use malloc, and realloc. Please see the coding example for illustration purposes. Don't worry of this lengthy question, most …

Member Avatar for f.ben.isaac
0
491
Member Avatar for greg022549

I am enclosing my code and as you can see below the Event Recorded Banner the event type will not display. I would appreciate if you could show me what my problem may be. Everything else works properly. I am stuck. [code=cplusplus] #include <iomanip> #include <cmath> #include "EventBooker.h" EventBooker::EventBooker() { …

Member Avatar for VernonDozier
0
121
Member Avatar for orwell84

I have a problem with a program I'm writing. It's supposed to find the factorial of the number you input, but it's not. The problem seems to be that the recursive function isn't...well...recursing. Right now, when compiled, the program multiplies the number by the number before it. So if it's …

Member Avatar for orwell84
0
151
Member Avatar for Takafoo

So I have the below code to check the input, I'm just having trouble because apparently flushing the input causes the tests (its an assignment) to lock up and I need to manually break out of it. The problem is that if I remove the flushing of the input it …

Member Avatar for Takafoo
0
126
Member Avatar for Dragonsfire

So, I'm attempting to write an object oriented program that solves simple sudoku puzzles by checking the rows, columns, and the 3 x 3 grid. [code] #include <iostream> using namespace std; #include "doth.h" int main() { User file: Sudoku call; int flag=0,ptx=0,pty=0; call.Display(); for(;flag != 1;) {[COLOR="Red"] if (Puzzle[ptx][pty]==0) { …

Member Avatar for Dragonsfire
0
92
Member Avatar for trixymix31

Hi, I have a homework problem in where I have to count the vowels from a readin file from a flashdrive/harddrive. Then the amounts of each vowel has to be displayed & which occurred the most amount of times & which occurred the least amount of times. Extra credit (which …

Member Avatar for trixymix31
0
96
Member Avatar for Lukezzz

I have a little problem. I have a lot of code in the backgroundWorker2 (//Do Stuff) When pressing the button1_Click, everything works great and the code executes for the backgroundworker. But if I now try to drag the form around on the desktop, the form will "get stuck"(Not Responding). It …

Member Avatar for Lukezzz
0
73
Member Avatar for SUD

I am new to C++ and attempting to complete an exercise my question is How you can use cin.ignore to ignore every character up to and including a specified character – for example a full stop, ’.’.

Member Avatar for William Hemsworth
0
831
Member Avatar for Azurkan

So A friend and I are new to C++ and we are trying to create a sudoku project and are trying to figure out different ways to do so. Right now we are stuck at the repetition checking. I was wondering if anyone could help us out?? We are trying …

Member Avatar for nucleon
0
95
Member Avatar for jimjohnson123

I am at work and did this program on notepad and not sure if this is correct or not. Can someone that has the visual studio compiler test this and let me know if it works. If it does no could you offer any minor feedback on the location of …

Member Avatar for nucleon
0
147
Member Avatar for Talguy

I'm new to threading and wanted to make a program that was going to receive data from two separate pieces of hardware and populate a queu with their data. I then wanted to pull the data out of the queue and draw it to the screen graphically. So each piece …

Member Avatar for Talguy
0
117
Member Avatar for neox183

I was given this assignment to create a function and have the user input a number and the function is suppose to give you the amount of change back. My program is listed below [code] #include<iostream> using namespace std; int change(int,int& ,int& ,int& ,int& ,int& ,int& ); int main() { …

Member Avatar for neox183
0
88
Member Avatar for daviddoria

I was reading about the new "tuple" type coming in c++0x, and I decided to try it. I saw that if you give a compiler flag -std=c++0x it will work. So I did it, and then #include <tuple> works and everything was good. Then I decided to try the default …

Member Avatar for daviddoria
0
83
Member Avatar for nito28

For this assignment you will write a wrapper routine for the LAPACK routine DGESV to solve the system of equations Ax=b (where A is a num by num matrix, and x and b are vectors of length num). A wrapper is a routine that reformats (or supplements) it's arguements in …

Member Avatar for StuXYZ
0
130
Member Avatar for nito28

For this you will write a Gaussian Elimination routine (with or without pivoting - for most of you, I highly suggest without) that solves the equation A x = b where A is a square matrix (num by num), and x and b are vectors. A and b are known, …

Member Avatar for Lerner
-1
181
Member Avatar for daviddoria

Is there a built in type to store UNordered pairs? ie. I want these [code] pair<double, double> a(4.0, 5.0); pair<double, double> a(5.0, 4.0); [/code] to be equal. Do I have to make a wrapper and override == ? Thanks, Dave

Member Avatar for DemonGal711
0
135
Member Avatar for erialclaire_238
Member Avatar for daviddoria

I often have this situation [code] class OrientedPoint { private: Point P; Vector N; Color C; bool valid; public: //////////// Constructors ////////// OrientedPoint() {} OrientedPoint(const Point &Coord); OrientedPoint(const Point &Coord, const Vector &Normal); OrientedPoint(const Point &Coord, const Color &C); OrientedPoint(const Point &Coord, const Vector &Normal, const Color &C); [/code] where …

Member Avatar for daviddoria
0
119
Member Avatar for raymyster

Use the stack class in a program that reads a String, one character at a time, and determine whether the String contains balanced parentheses, that is , for each left parenthesis ( if there any ) there is exactly one matching right parenthesis later in the String . so the …

Member Avatar for VernonDozier
0
231
Member Avatar for 2009march

trying to write a program in C++ that will take a DC voltage as an input into a PIC16F88 (18 pin). and will output 2 seperate voltages, to run two different motors. when the input voltage is greater then 1.5v it will output a small voltage to both outputs, and …

0
49
Member Avatar for daviddoria

Is pthreads still the way to go to detach a process from the main thread in linux? It seems seems kind of convoluted/old/c-style from looking at some examples - is there a more "c++" way? Thanks, Dave

0
48
Member Avatar for FrancisC07
Member Avatar for homeryansta

csci>g++ -c queue.cpp csci>g++ queue.o project6.cpp Undefined first referenced symbol in file Queue<int>::return_index() /var/tmp//ccHbZwrM.o Queue<int>::enqueue(int) /var/tmp//ccHbZwrM.o Queue<int>::dequeue() /var/tmp//ccHbZwrM.o ld: fatal: Symbol referencing errors. No output written to a.out collect2: ld returned 1 exit status These are my errors. As you can see, my implementation file compiles, but does not compile …

Member Avatar for homeryansta
0
128
Member Avatar for shamila08

Hello..... i got a problem where my output are repeated..... how to solve this problem.... [code=cplusplus] #include <stdio.h> #include <stdlib.h> #include <iostream> #define MAX 100 int num[MAX]; int n; int nrows = 0; int temp =2; using namespace std; void print() { if (num != 0) { for (int i …

Member Avatar for WaltP
0
83
Member Avatar for CPPRULZ

I have recently learned about virtual functions and it is to my understanding that they are a keyword that goes in front of the return type when defining a function. They go in a base class, and make it so that if a member function of the base class is …

Member Avatar for nucleon
0
106
Member Avatar for cruisx

Hi, i was wondering if it is possible to launch a .exe file using c++? say i want to write a simple program which will ask the user if the would like to install the following.:(i am just making it up) Please pick the number beside the program to launch …

Member Avatar for nucleon
0
14K
Member Avatar for jimjohnson123

I am testing a program that I am trying to run and having some difficulties with it. If you run this program I am able to compille it fine but will not return anything and stalls on me...Here are the instructions..... There are 25 digits split into five groups of …

Member Avatar for WaltP
0
1K
Member Avatar for shea279

ok so i have some code that works perfectly with visual studio 2003, but when i move it into my project which is using visual studio 2008, the compiler spits out 9 errors. compiler output: [CODE]1>Compiling... 1>main.cpp 1>.\main.cpp(3) : error C2011: '_STORAGE_QUERY_TYPE' : 'enum' type redefinition 1> C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winioctl.h(641) …

Member Avatar for greg022549
0
458
Member Avatar for IrishHenshin

Hi basically I've exhausted my mind looking for resources and help on the Huffman Tree Coding. This is my problem, there are 2 parts to what I have to do, the first done: 1. Given a text file, determine the frequency of each character in the text (map of character …

Member Avatar for monkey_king
-1
140

The End.