49,756 Topics

Member Avatar for
Member Avatar for OneTimer

Hey... Not very experienced with computers here and I seem to have done something very wrong. I found a C++ beginner book and decided to give it a go. It came with Visual C++ 2005 express edition. I went online, found out there is a 2010 version and installed that …

Member Avatar for mjdodd
0
118
Member Avatar for apanimesh061

You have a computer with only 2Mb of main memory. How do you use it to sort a large file of 500 Mb that is on that disk? This was a question that I was asked.... but I couldn't figure out the answer. Please help !!!!

Member Avatar for ziggystarman
0
111
Member Avatar for diffuse

Hi all, I know you guys get a lot of questions regarding hangman game programs and I'm sorry to bog down the boards with another question regarding the game. I've combed through previous posts trying to see if my issue has been resolved and I have been unsuccessful. Here is …

Member Avatar for WaltP
0
264
Member Avatar for jarhammy

Hello, I am currently working on a school assignment, and I have spent a great amount of time on this, but I am coming up with a couple of error messages that I can't figure out. Here is my code: [CODE]#include <iostream> #include <string> using namespace std; class Date { …

Member Avatar for jarhammy
0
115
Member Avatar for CD1

Hello I have some trouble interpreting a string and I hope you can help me. I have to convert a string, or a word in a number. Like five hundred fifty in 550. I dont know exactly how to do it. I was thinking to try to analize each word, …

Member Avatar for CD1
0
79
Member Avatar for Logert

My project is to optimize wind turbine placement in a given area. In order to do this, I'm using both a wind simulation program (openWind: awsopenwind.org) and the a genetic algorithm code base (Evolving Objects: eodev.sourceforge.net). The process should work like this: openWind will randomly place wind turbines in its …

Member Avatar for mike_2000_17
0
213
Member Avatar for Games53

The code below is the code I used last semster to turn decimal format intergers into hex, now is there a way I can reverse this function, and have it turn hex into dec. Also the reason it is in a function format is we were studying funtions at the …

Member Avatar for Red Goose
0
88
Member Avatar for pucivogel

Hey there!I'm doing this symbolic differentiation program,and i have some problem with the code.The code in the "main" is ok ,but i have problems in the "to_term" function.Can you help me out to find where my mistake is?Please if you have any idea reply me now Thanks. [CODE]#include <iostream> #include …

Member Avatar for pucivogel
0
150
Member Avatar for Violet_82

Hi there, I have done a small exercise (ex 4.17 on C++ how to program - deitel and deitel) which basically is about writing a program that uses a while statement to determine and print the largest number of 10 numbers input by the user. The program should use 3 …

Member Avatar for Violet_82
0
185
Member Avatar for Duki

Hey everyone, I'm trying to do something like this: [code=c++]typedef void * socktag int gensock_connect (char * hostname, char * service, socktag * pst) { int retval; connection * conn = new connection; if ((retval = conn->get_connected (hostname, service))) { gensock_close(0); *pst = 0; return (0); } *pst = conn; …

Member Avatar for Duki
0
641
Member Avatar for kemkoi

Okey , this is what happends , when I write in my code and compile it this error shows up. [URL="http://data.fuskbugg.se/dipdip/Problem%20med%20c%2B%2B%20script.jpg"]http://data.fuskbugg.se/dipdip/Problem%20med%20c%2B%2B%20script.jpg[/URL] And after recieving this error I can't run it ofcourse... , I got the code from a book " Learn c++ in 3 weeks" I copied the code and …

Member Avatar for Fbody
0
170
Member Avatar for balwin

i have written the code and tried to compile, but it always say that the file can't be read, yet i have put the same name file in one directory with the c++ file. need your help so can read the file on my mac.. #include <iostream> #include <fstream> #include …

Member Avatar for Fbody
0
172
Member Avatar for vddmanikanta

Hai everyone Can u please help me in writing a basic singleton programme in C++ and please explain code that are specially used to make the class singleton else please send a link where I can get the same Thanq Have a nice day

Member Avatar for mike_2000_17
0
167
Member Avatar for sidra 100

plz can any1 chk my program for errors[CODE]public class MinHeap{ private int size=100; private int list[]=new int[size]; private int currentSize=0; public boolean isFull(){ if(currentSize==size) return true; return false; } public boolean isEmpty(){ if(currentSize==0) return true; return false; } public void insert(int val){ int current,parent,temp; if(isFull()) System.out.println("Heap is full"); else{ list[++currentSize]=val; …

Member Avatar for ravenous
-6
116
Member Avatar for Ascaris

Hi there. I was trying out a relatively simple program to convert a line of text into a 2-D string array which each word in a different row but it isn't working. The program is [CODE] #include <iostream> void main() { int i, j, k=0; char line[30]={"This is a test"}, …

Member Avatar for Ancient Dragon
0
289
Member Avatar for SpecialForce

Here I have a small piece of code: [CODE]ofstream hello ("hello.txt"); hello << "Γειά σου!"; //hello in greek hello.close();[/CODE] And here is the output: [CODE]Output on greek windows: "Γειά σου!"[/CODE] [CODE]Output on english windows: "ÃåéÜ óïõ!"[/CODE] Can someone, please, help me find out how to fix this?

Member Avatar for danb737
0
105
Member Avatar for Duki
0
71
Member Avatar for Duki

What happens if I have a method declaration of: [code=c++]int method( char * a, char * b, int * c );[/code] and then I pass in: [code=c++] char a; char b; int c; method(a, b, &c); [/code] This has me a little puzzled. What values will be passed by reference?

Member Avatar for Duki
0
213
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
115
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
1K
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
44
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
169
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
212
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
108
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
112
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
94
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
167
Member Avatar for rdx71

The End.