49,766 Topics

Member Avatar for
Member Avatar for sidra 100

plz help me in my algorithm to first enter data in array then making a min heap out of it [CODE]#include <iostream> #include <stdlib> using namespace std; class Heap { int currentsize; int *array; int capacity; void heapsort(int[],int); public: void buildheap(); void isempty(); void isfull(); int getsize(); } main() { …

Member Avatar for Duki
-1
116
Member Avatar for TheDestroyer

Hello programmers :), I'm creating a program that requires too many command line parameters to run. I noticed that many system programs in Ubuntu (my operating system) have the feature of auto-completion of the command line parameters. So, for example, if you type the following in Ubuntu: sudo apt-get i<tab> …

Member Avatar for TheDestroyer
0
2K
Member Avatar for bussa.forums

how to use the FXPrintDialog class i create an object and for that constructor i passed one FXdialogbox object which i need print is it correct please help me any one thanks in advance [CODE] #include <fx.h> // Main Window PrintTestDialog class PrintTestDialog : public FXDialogBox { // Macro for …

0
45
Member Avatar for Annettest

Hello all: I would be grateful for some basic advice about C++ error handling. From my reading, I understand that the "try, throw, catch" method is preferable to dealing with return values, which can be cryptic. But I'm not sure if I understand exactly how this works. I made a …

Member Avatar for Moschops
0
173
Member Avatar for anujkawasthi

Hi All, I am a new member of this forum. i have some query related to USB device. Actually , i want to copy a file/ folder by sector or file level from One source volume to destination volume. Main requirement is this that: a) Source Volume to Destination Volume …

-1
64
Member Avatar for Crutoy

Hello, i'm reviewing the exercise from the book and trying to understand the point. Basically it creates a static array and declares uninitialized char pointer. Then it allocated memory dynamically to the same char pointer. What i don't understand why is the program using strcpy() to copy string into newly …

Member Avatar for lisaroy1
0
302
Member Avatar for Phinisher

How do I appropriately go about resetting where the pointer is in a file? I was under the impression that I had the correct way, but my code is not properly functioning. I need to do a character count, word count, line count. Which ever function I run first returns …

Member Avatar for griswolf
0
110
Member Avatar for megaLU

Hey, My code was working great yesterday. I go to submit it and it's got this new error out of nowhere! It is 'class std::vector<long double>' has no member named '_'. It says instantiated from the line [code] vector <LD> matrix; [/code] and then takes me to some code entitled …

Member Avatar for jonsca
0
2K
Member Avatar for LeMajestique

I am having trouble making this menu, I followed some instructions online but I can't seem to get it to loop back to the menu after I am done with a menu selection. Please Help! [CODE]#include <iostream> #include <string> #include <cmath> using namespace std; int main () { int choice; …

Member Avatar for LeMajestique
0
114
Member Avatar for jmaple

So I thought I had an understanding of pointers and references but I'm not sure whats going on with int*& x. Does this mean a reference to a pointer to an int? also what use does this have?

Member Avatar for jmaple
0
97
Member Avatar for lius84

Hi all, I write because I am struggling with a very strange thing. I have this class: [CODE] static const long POINTS_VERY_FEW = 100; class Bin2DSphere { /*! Class for 2-dimensional binning on a sphere */ public: string Name; double PhiMin; /* Minimum value of Phi */ double PhiMax; /* …

Member Avatar for mike_2000_17
0
179
Member Avatar for rdx71
Member Avatar for MasterGberry

Ok, well I have done some research on this. And I have tried a few different methods, both seem to be giving me the same results, which must mean there is something else going on here that I am not understanding, or its just not working right. EDIT: This piece …

Member Avatar for MasterGberry
0
201
Member Avatar for martin11ph

I need a program that opens a sample program and counts the number of reserved words, operands and operators. Operands and operators are easy to distinguish. My problem is how do I determine the reserved words there? One solution I thought of is to create a separate text file that …

Member Avatar for mrnutty
0
153
Member Avatar for ThatGuy2244

I am trying to make a win32 program which uses an array of data that then gets put on the window. That way I can do my drawing on the array and then bitblt it or something to the screen. How would I do this. Also how many bytes of …

Member Avatar for ThatGuy2244
0
125
Member Avatar for kchyn

Hi, I want to send chains of 12 bits of data through USB, but I'm completely new to USB programming. Say I type in "A", and it'll send 000000000001 or something like that. Basically, I'm wondering how you tell the USB port to send a 0 or a 1 in …

Member Avatar for pseudorandom21
0
3K
Member Avatar for hystaspes

Hey there Geeks! Sorry if I'm posting this in the wrong place, it is about a .cpp file but it isn't about C++, it's about the text file. I was doing my graphics programming assignment with directx and it was somewhere around 80% done and suddenly I made a wrong …

Member Avatar for iamthwee
0
239
Member Avatar for winecoding

A C++ newbie question: I found the following function: [CODE]int &min(int &x, int &y) { return x < y ? x : y; }[/CODE] I am confused of the usage of “&”. Is that possible to re-write the above function as [CODE]int &min(int x, int y) { return x < …

Member Avatar for mike_2000_17
0
122
Member Avatar for RuneFS

Im currently in the need of some code metrics. Specifically Im in need of afferent + efferent coupling and Instability measures. I used to work with NDepend (on .NET platform) but I now need to be able to make similar measurements on a c++ project. If you don't know NDependt, …

Member Avatar for IssamLahlali
0
116
Member Avatar for somshridhar

Dear Sir, I am trying to print the string with the following code, but I am getting errors like Undefined symbol 'string' Undefined symbol 'str'. [CODE]#include<conio.h> #include<string.h> #include<iostream.h> void main() { string str = "My name is shridhar"; cout<<"What is your name"<<str; getch(); } [/CODE] I think the problem is …

Member Avatar for kernel>panic
0
4K
Member Avatar for muze

hello guys... I have been trying hard to connect to SQL Server using MFC but could not do that. No proper examples I could found. I know this can be done using ADO (ActiveX Data Object with COM) but have been unable to do that. Please can anyone of you …

Member Avatar for Ancient Dragon
0
80
Member Avatar for JordanHam

I have a CSV with a large number of rows and 7 columns. I get the data from another source and it is labeled as say Column 1 is first name, 2 is last, 3 is age, 4 is gender, 5 is city. I need to be able to scan …

Member Avatar for Fbody
0
108
Member Avatar for Annettest

Hello all: I have read that the purpose of const member functions is to specify which functions may be used on const objects. This makes sense. An example is given in my text and I don't understand it. If anyone could help, I would be very grateful. Here is the …

Member Avatar for Annettest
0
219
Member Avatar for kookai

hi I need help with this problem. I have tried writting the program, i just can not get it to run properly. Please Write The Fibonacci series 0, 1, 1, 2, 3, 5, 8, 13, 21, ... begins with the terms 0 and 1 and has the property that each …

Member Avatar for Nick Evan
0
2K
Member Avatar for hystaspes

Sorry if I'm posting this in the wrong place, it is about a .cpp file but it isn't about C++, it's about the text file. I was doing my graphics programming assignment with directx and it was somewhere around 80% done and suddenly I made a wrong turn with a …

Member Avatar for ravenous
0
193
Member Avatar for ajst

Hi guys and girls, I've decided to pick up C++ again after not using it for 2 nearly 3 years. I've been programming in java and c# in the mean time so my understanding of programming is very good. I've been trying to make a pack of cards but for …

Member Avatar for ajst
0
360
Member Avatar for rohan1020

Hello... I've been trying to learn about audio sampling in C++ for past few days. What I learnt was that computer converts analog signal (of sound) and converts it to digital discreet signals and unit called a sample. Also there may be around 40,000 samples taken in a second. My …

Member Avatar for Moschops
0
110
Member Avatar for pucivogel

Hi there,i have to create a program that shows the symbolic derivative of a polynomial function, and my teacher told that it is all about string manipulation,but i cant find find any valid tutorial or something that shows me how to do it.i've checked but what i have found is …

Member Avatar for pucivogel
0
310
Member Avatar for frank731tr

Hello I'm taking my first C++ class and I have really embarrassing question ( because I'm sure I'm missing something simple but I just can't figure out what): Why won't my output "dead loop" show after the do while loop ends with the user entering enter? [CODE]// This program will …

Member Avatar for frank731tr
0
118
Member Avatar for Annettest

Hello all: I would be very grateful if someone could help me to understand header and definitions files. A colleague told me that definitions should never be included in a header file, but I also read that template and inline functions should be included. Is this true? If so, is …

Member Avatar for thelamb
0
240

The End.