49,761 Topics

Member Avatar for
Member Avatar for bigmaq

So I am programming a heap sort and i am gettin pretty close to where i need to be, but I am having trouble in one of my functions when it heapifies my array. here is the code. [code] #include<iostream> using namespace std; class Heapsort { private: int *array; int …

0
73
Member Avatar for dchunt

Is there any language or way to write a program that is about 10000 lines in such a way that it can't be re-engineered by decompiling it ? What options are available to pursue ? Thank you for your time..

Member Avatar for kolosick.m188
0
104
Member Avatar for zephy2

Hello everyone, I have used the Vector2 Class which is implemented by my asst. , and I encountered a problem with initializing it. VS2008 kept saying I violate 0xC0000005 Error, and I counldn't find any reason for this. Is there anyone who can tell me what mistakes I have made? …

Member Avatar for twomers
0
446
Member Avatar for Jalwes

Hi all, I'm having a heck of a time with our latest assignment. I've tried everything I can possibly think if to make this work, but with no luck. We need to Load an inventory text file, sort it, search it(haven't even got to that portion of the code). I …

Member Avatar for Tales
0
141
Member Avatar for Fajer91

Hello everyone i'm a new member , i need ur help with this code , i want to write a for loop that assigns the 3rd row of the array to 0,, and then print out the array after setting the 3rd row to 0.

Member Avatar for rahul8590
1
118
Member Avatar for ab00120

Hi there, I am trying to make a program, as shown below. I have used a snippet with hello and bye as the program is really very big. Unfortunately I am unable to edit these functions as they are all part of a complex linked list. I am trying to …

Member Avatar for jonsca
0
95
Member Avatar for gsingh2011

I'm making a graph theory problem solver and basically I made a bunch of functions that will set up the graph and allow the user to modify the graph, but obviously these functions can only be called from the program. The user can't just type the function name and expect …

Member Avatar for rahul8590
0
140
Member Avatar for rahul.nutron

Hi, Its my first project. I have to develop a c program which can balance a chemical equation by the method of 'Generalized matrix inverse method for balancing chemical equation and their stability'. But I am using a little different method. where I am not able to find complete step …

Member Avatar for rahul8590
0
148
Member Avatar for llemes4011

The company that I work for just bought a Qt License, so we've been messing around with it. So far, it's really nice. I'm more of a Java guy, and it's made the transition from Java to C++ much easier. The only real problem I have with it now, is …

Member Avatar for rahul8590
0
84
Member Avatar for ankit_the_hawk

Hello every1 I was making this program of a phone directory to store contacts and all their information in C. I made use of structure and then copied the data of the structure to a file. the structure is [code] struct phdata { char name[20],add[20]; int phno; }ph[20]; [/code] the …

Member Avatar for aqtel003
0
214
Member Avatar for SDPRIYA

i have downloaded mhah library and i tried to include it in turbo c++ i copied the folder to the turbo c++ when i tried to run the c files in the library i found 5 errors cant able to include mutils/mincludes.h... mutils/mtypes.h... mutils/global.h... mutils/mhash.h... libdefs.h mutils folder is found …

Member Avatar for Ancient Dragon
0
331
Member Avatar for FanatiK

Hi, my name is Jonathan. I am 20 years old and I have just started getting into programming in the C++ language (you must get this alot). I do know a couple of programming languages already. Now before I waste your time let me just say that there is no …

Member Avatar for FanatiK
0
94
Member Avatar for pymatio

I'm creating a media player with Qt & the phonon module: [CODE] #include "mainwindow.h" #include "ui_mainwindow.h" #include <fstream> #include <string.h> #include <stdlib.h> #include <QtGui> void MainWindow::slotFinished(){ int index = sources.indexOf(mediaObject->currentSource()) + 1; mediaObject->enqueue(sources.at(index)); setLabelNowPlaying(); } std::string ExtractFilename( const std::string& path ) { return path.substr( path.find_last_of( '/' ) +1 ); } …

0
148
Member Avatar for ihtesham4deni

Problem Statement: File Handling in C/C++ On the basis of the given scenario create a file Expenses.txt, Open the file and copy into another Expenses2.txt, Also show output on screen A college has announced the total budget of 50,000Rs.for each game. Games are done four times in a year. Take …

Member Avatar for rahul8590
-1
255
Member Avatar for pspwxp fan

According the exercise, which makes us practice with vectors, i am supposed to write a program that allows the user to enter his/her favorite games, view them and remove any he likes. Obviously, to remove a piece of text, it has to be of the same case as the one …

Member Avatar for pspwxp fan
0
111
Member Avatar for drake2212

I am having an issue. I need to check whether the user enters a digit greater than 0. If so the user needs to be reprompted. If 23409932 is entered then the 0 entered should be caught and the proper messaage displayed. Here is my code and please somebody help. …

Member Avatar for rahul8590
0
87
Member Avatar for tomtetlaw

How do I load 3D meshes from a .x file, and extract the material data from it? Also, how do I apply a texture to the loaded mesh?

Member Avatar for tomtetlaw
0
179
Member Avatar for bestnone

i keeps getting error i going to break my head to solve this problem =.= what i am doing is using the a[3][3] to minus 128 but seem i get the problem in minus [CODE]#include <iostream> #include <iomanip> #include <cmath> #include <cstdlib> using namespace std; double shifted_block(double array[3][3]); int main …

Member Avatar for jonsca
0
137
Member Avatar for ms_farenheit1

I am working on writing a class to define an NxM matrix. A matrix should be printed in the form: [0 1 2] [3 4 5] [6 7 8] [CODE]private: //matrix class member variables unsigned int rows; unsigned int cols; float * data; // constructor matrix::matrix(int r, int c) { …

Member Avatar for Fajer91
0
108
Member Avatar for bamcclur

[CODE] //////////////////////// /////counter.h file///// //////////////////////// #ifndef _COUNTER_H #define _COUNTER_H class Counter{ private: int counter; int limit; static int nCounters; public: Counter(int arg, int arg); void increment(); void decrement(); int getValue(); static int getNCounters(); }; #include "counter.cpp" #endif ////////////////////////// /////counter.cpp file///// ////////////////////////// #include <string> #include "counter.h" Counter::Counter(int a, int b){ counter=a; …

Member Avatar for bamcclur
0
447
Member Avatar for johndoe444

Hi, The problem I am facing is that I don't understand the code mentioned in the following: [CODE]25: /******** this is the main thread's code */ 26: int main(int argc, char *argv[]) 27: { 28: int i; 29: int retvals[NTHREADS]; 30: 31: /* init retvals */ 32: for (i=0; i<NTHREADS; …

Member Avatar for bamcclur
0
165
Member Avatar for rafta

In this code I want to have a function to show average of movies saw by students, how to define and declare and call it in this program: [CODE]#include <iostream> #include <iomanip> using namespace std; /****************Function Prototypes******************/ void displayList(int [], int); //function to display array void getAverage (int [], int); …

Member Avatar for jonsca
0
84
Member Avatar for zemly

Plz help me. I am unable to understand this problem statement. Can Plz someone help me? [B]Problem Statement: File Handling in C/C++[/B] On the basis of the given scenario create a file Expenses.txt, Open the file and copy into another Expenses2.txt, Also show output on screen A college has announced …

Member Avatar for zemly
0
124
Member Avatar for tomtetlaw

How do I load 3D models that are in the .x format from DirectX 9? I am trying to make a simple engine and this is the part where I am stuck at.

Member Avatar for tomtetlaw
0
84
Member Avatar for new programer

Hello all, I did this program below, it is meant to get a student name then 5 of his/her grades sums them up in a void function and calculate the average but outputs the average from the main the problem is that the loop goes on and prints the prompt …

Member Avatar for ScottieF
0
165
Member Avatar for confusedndazed

My question: What is the output of the code corresponding to the following pseudocode? [code=text] Set y = 0 For (i = 0; i<=6; i=i+3) For (j = 0; j<=15; j=j+5) Set y = y + 1; End For (j) End For (i) Output y [/code] This is what I …

Member Avatar for rafta
1
119
Member Avatar for KRal

// I am new to C++ and can not seem to get the falling man to output to the screen. Any help would be greatly appreciated. [code] #include <iostream> #include <windows.h> using namespace std; void DrawBar(char guess); int main() { char solution[8]; //holds solution char blank[8]; //holds "*"'s for unsolved …

Member Avatar for KRal
0
184
Member Avatar for maverick405

I just want to know what does the below mentioned function means? [CODE][COLOR="Green"]void swap(char& a, char& b)[/COLOR][/CODE]

Member Avatar for mrnutty
0
75
Member Avatar for Ryujin89

I am probably well on the wrong path with this one which is why I can't get the program to compile in the slightest. The assignment instructions are : [quote]The Frozen Tongue Ice Cream Shop sells six flavors of ice cream: chocolate, vanilla, strawberry, mint, rocky road, and mocha. The …

Member Avatar for Ryujin89
0
146
Member Avatar for Deadmon

Hello all, I'm trying to parse a file, but for some reason, getline is combining my two letter words with other words. Here is the portion of code I'm working with: [B]note[/B]: my program will always ignore the first word in a line [CODE] char line[256]; string word; char *line2=new …

Member Avatar for sfuo
0
101

The End.