49,761 Topics

Member Avatar for
Member Avatar for Zvjezdan23

[CODE]// This is a program that displays the choice the user picks using a Switch Statement #include <iostream> #include <string> using namespace std; int main() { // Underneath A switch program that shows the user his input choice string word1 = "Achieve"; cout << "Welcome to Your AccuWeather Report Screen." …

Member Avatar for alaa sam
0
188
Member Avatar for ravenous

I have to calculate the modal value of [icode]std::vector< int >[/icode] quite often, so I thought I'd share my general method for people to look at, use and/or comment. In my case, the vectors usually contain values in the range 0 - 255. The code first creates a [icode]std::vector< int …

Member Avatar for vijayan121
0
1K
Member Avatar for apanimesh061

Hi there, I am new to using Visual C++ 2005 enterprise Edition. I do not know how run a C++ program in it. It's environment is similar to Turbo C++ 5.5 IDE but still I can't see any 'Run' command anywhere and Ctrl+F9 does not do anything !!!!! Please help …

Member Avatar for alaa sam
0
199
Member Avatar for ntrncx

hey,thats my first post,i started recently to have for hobby programming,and i am really interesting to learn. anyway i have a problem i write a program that use some classes objects my problem is probably fundamental but i couldnt find answer on net. i have one header file that i …

Member Avatar for ntrncx
1
449
Member Avatar for David_Omid

Hey guys, I have a problem with a chess game I'm creating using Windows Forms. The purpose of this code is that I have a load of panels with picture boxes inside them. When the user moves their cursor over the panel or the picture box, the panel lights up …

Member Avatar for David_Omid
0
213
Member Avatar for jfunchio

I'm writing a program for a class that does operations with rational numbers. I'm not finished with it, but right now i'm working on the is_negative() function which is required to be in the program by the teacher. He has set up a make file to test each part of …

Member Avatar for Fbody
0
351
Member Avatar for Tech B

[CODE] #include "windows.h" #include "loadbmp.h" // from http://gpwiki.org/index.php/LoadBMPCpp #include "fdlib.h" void main(int argc, char *argv[]) { int i, n, x[256], y[256], size[256], w, h, threshold; BMPImg *bi; unsigned char *bgrdata, *graydata; if (argc==1) { printf("usage: fdtest bmpfilename [threshold]n"); exit(0); } bi = new BMPImg(); printf("nloading %sn", argv[1]); bi->Load(argv[1]); w = …

Member Avatar for Mahnaum
0
184
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
120
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
112
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
152
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
187
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
644
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
175
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
168
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
291
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
106
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
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
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
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
170
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

The End.