132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for confusedmind

hi i am having trouble understanding that what is the difference between having class xxx { } in the .h file and not having it? say i have these two code, can anyone tell me the difference? [CODE] #ifndef sample_h #define sample_h class sample { function1 (); function2 (); }; …

Software Development c++
Member Avatar for Ejaz
0
142
Member Avatar for Simplicity

[COLOR=Blue]Hey guys, For the snake game, I need to use different colours for the snake and food. At least two different colours must be used (other than white and black). How can I change the colours? I tried many ways but none did it properly :sad: ![/COLOR] This is the …

Software Development c display
Member Avatar for Simplicity
0
121
Member Avatar for kwongchungying

hello, i posted a thread before but i attached files so i guess it's too much trouble, i wish somebody can help me coz i have spent more than 5 hrs just to compile a very simple program, i have tried visual c ++ 6.0, g++ and gcc all have …

Software Development c++ display
Member Avatar for Narue
0
931
Member Avatar for Asif_NSU

I had been using old turbo C++ compiler and with i had the help files on C++. However, the documents with my old version of turbo c++ is quite obsolete now. I want to get the latest docs so that i can look up specific function and class details with …

Software Development c c# c++
Member Avatar for vegaseat
0
252
Member Avatar for prathys

hello guys, I came across a strange thing when doing program in c++ in visualc++ environment.just run this code and after entering the array elements press up arrow and down arrow. Here's the code #include<iostream.h> void main() { int arr[5]; cout<<"Enter the array elements : "<<endl; for(int i=0;i<5;i++) cin>>arr[i]; cout<<"\n\n"; …

Software Development c++
Member Avatar for Asif_NSU
0
137
Member Avatar for JoBe

Hi ladies and gentlemen, Gotta question, I have a program in wich I make a small array of 100 random numbers wich are smaller then 1000! Like this: # define MAX 100 void srand(int tabel[MAX]); void srand(int tabel[MAX]) { for (int i=0;i<MAX;i++) do tabel[i]=rand(); while (tabel[i]>1000); } This of course …

Software Development c
Member Avatar for JoBe
0
186
Member Avatar for hill0ster

Narue, thanks for all your help with this program! I really appreciate it. I have one last problem. In the function tryAgain, if user presses 'q' or 'Q'; the program terminates. No problem there, but if they hit anyother key; the program should allow them to re-enter pyrllSt (payroll status …

Software Development c++
Member Avatar for iumair
0
126
Member Avatar for JBazil

ok heres the deal... i took a C++ class as an undergrad WAAAAAY back in the day and have forgot almost all of it. i recently DLed a C++ program that came with several files. i have tried to run this program to see if i obtain the same results …

Software Development c++
Member Avatar for JBazil
0
232
Member Avatar for confusedmind

ok, here are the questions. QUESTION NO. 1: I am asked to build a complete binary tree using linked list. According to my knowledge, you are not able to sort the tree with a complete binary tree otherwise it is impossible to get it complete. I searched thru google and …

Software Development c++ first-post google linked-list
Member Avatar for confusedmind
0
1K
Member Avatar for quasimof

I have an assignment where I am given a sequence and I must turn the user's input (int) into that sequence. For example: number : 2 The sequence starting at 2 is : 2 4 16 37 58 The sequence is: 2^2=4, 4^2=16, 1^2+6^2=37, 3^2+7^2=58, etc.... how would I compute …

Software Development c++
Member Avatar for quasimof
0
133
Member Avatar for tendekai

where can i get the c and c++ compiler.i eed to run it on a windows xp machine.

Software Development c c# c++ windows-xp
Member Avatar for vegaseat
0
193
Member Avatar for Nyika

I have 2 files: a .h file and a .cpp file. I am new to c++ but need to know how to execute these files. In other words, how do I write a 'main' so I can actually get an output to these 2 files. I am using Microsoft Visual …

Software Development c++ microsoft visual-studio
Member Avatar for Nyika
0
101
Member Avatar for willow

Previous program being used, that works fine. I have tried placing my break statements in various places within the programming and cannot get it to run that specific triangle that was entered so that I can enter the letter 'q' to quit. Program is to execute continuously until the user …

Software Development c++ display
Member Avatar for vegaseat
0
176
Member Avatar for ghoststriker7

okay i know how to use fstream and everything, but the prolem is that I want to use a variable in ithe open part. exp const. pretend all headers are included. It works like this { ... ifstream infile; infile.open("text.txt"); ... } but when I want to use a variable …

Software Development c++
Member Avatar for ghoststriker7
0
162
Member Avatar for dcving

:?: how do I get the high-lighted lines below to round up to just two (2) decimal places using the `setprecision` // Program description: Calculate the price, including taxes, of a water bill // given the amount of water in gallons // Author: Eric Martin // Date: 10.21.2004 #include <iostream> …

Software Development c++
Member Avatar for Stack Overflow
0
255
Member Avatar for ultimate_fusion

heres the problem; some one inputs a 4 digit number e.g 1234 I stored it as a string and i have to display it in a messagebox like ----------------------------- the digits are 1 2 3 4 ------------------------------------ How? p.s i know how to do trhe input box and display, but …

Software Development display java
Member Avatar for server_crash
0
140
Member Avatar for Sanirsanir

hi guys, Anybody tell me a site where free system available on C language. Thanks in Advance, Sanir

Software Development c c# c++
Member Avatar for vegaseat
0
334
Member Avatar for idicula

hey does anyone what these errors mean: ----------------------------------------------------------------- --------------------Configuration: a1 - Win32 Debug-------------------- Compiling... a1.cpp C:\Documents and Settings\Jinu\My Documents\Stuff\C++\Development\a1.cpp(46) : error C2146: syntax error : missing ';' before identifier 'bSq' C:\Documents and Settings\Jinu\My Documents\Stuff\C++\Development\a1.cpp(47) : error C2146: syntax error : missing ';' before identifier 'rightNum' C:\Documents and Settings\Jinu\My Documents\Stuff\C++\Development\a1.cpp(48) : …

Software Development c c# c++
Member Avatar for MoreCom
0
341
Member Avatar for sjopkg

I am a beginning programming student and was stumped on one of my programs. I really don't know where to begin on this one. I have to develop a MC++ program that will input the miles driven and gallons used (both as ints) for each tankful of gas. the program …

Software Development c++ display
Member Avatar for Dave Sinkula
0
143
Member Avatar for gwenny

I'm trying to write a program using a stack to determine if the two sequences of characters are the mirror image of each other. Can anyone help me to get started?

Software Development c++ image
Member Avatar for gwenny
0
178
Member Avatar for skamen

Hi, For class I have to write a program that performs mathematical operations onto fractions. I'm really drawing a blank as far as how to setup the function that reads the fractions inputed by the user. If you care to look the assignment can be found at: [url]http://www.cs.wmich.edu/~nelson/CS111FALL04/lab04/lab04.html[/url] The way …

Software Development c++
Member Avatar for Narue
0
2K
Member Avatar for Sukhbir

what happened if we do't typecast return value of malloc like that int *a=malloc(10);

Software Development c++
Member Avatar for Narue
0
141
Member Avatar for tendekai

#include<stdio.h> #include<conio.h> #include<string.h> #include<iomanip.h> FILE *fp1, *fp2; int count; struct record { char name[20]; int empnum; char depart[20]; float hours; float rate; }; void main() { clrscr(); record h; int acount=0,adcount=0,scount=0; float grosspay,totalg=0; float tax,totalt=0; float health,totalh=0; float pension,totalp=0; float netpay,totaln=0; float deductions; fp1=fopen("employ.dat","r"); fp2=fopen("payrol.dat","w"); count = 0; printf(" ""Page1\n"); …

Software Development c
Member Avatar for Narue
0
198
Member Avatar for Jackie001

okay u got me its not interesting at all but i thought if i said that more people would have a look!!!! sorry im trying to create a server that after the 10th connection of a client reads files and sends to the client, the client then sends back an …

Software Development client-server display java web-server
0
349
Member Avatar for somer2412

Please help I am writing a program that calculates the mean and median of a sequence of integers. My program works fine as long as the array is odd. Can someone please help me with a statement to calculate the median when the array is even. I have included my …

Software Development c++
Member Avatar for Dave Sinkula
0
392
Member Avatar for dmorgan89

need some help with my java code. i'm getting incompatible types error. can anyone tell me what's wrong with my code? import java.io.*; public class ifelsechain2 { public static void main(String[] args) throws java.io.IOException { String string1; int num1; InputStreamReader isr = new InputStreamReader(System.in); BufferedReader br = new BufferedReader(isr); System.out.println("Enter …

Software Development java
Member Avatar for server_crash
0
116
Member Avatar for wangstarr

Hi, I am having some problems with a program I'm supposed to write: here is the program I am supposed to write: Write a modular program that uses a structure to store the following information about a customer account: Name Address City, state, and ZIP Telephone number Account Balance Date …

Software Development c++ data-structure display user-interface
Member Avatar for Stack Overflow
0
149
Member Avatar for wangstarr

Good evening all, I am now working on a project for my intro c++ course and I'm having alot of difficulty understanding how to make a class program. I've been looking over the text but I am still confused. I would really appreciate any suggestions, ideas , or ways to …

Software Development c++
Member Avatar for Stack Overflow
0
362
Member Avatar for wewe

Hi i have a problem linking upthe files main.cpp tree.cpp tree.h and list.ct really do not know how to complie with list.ct whats the ct ? anyway inside the list.ct, are templates. it reflect linking problem.. i.e. [Linker error] [B][I]undefined reference [/I] [/B] to `Tree::cleanUp()' [B] Question:[/B] what should i …

Software Development c++
Member Avatar for wewe
0
122
Member Avatar for HollywoodTimms

Here is what I have #include <iostream.h> int main() { int i, total[3]; int myValue[3][3]; myValue[0][0] = 53,000; myValue[0][1] = 5; myValue[0][2] = 1; myValue[1][0] = 89,000; myValue[1][1] = 3; myValue[1][2] = 2; myValue[2][0] = 93,000; myValue[2][1] = 3; myValue[2][2] = 3; for (i = 0; i < 3; i++) …

Software Development c++ queue
Member Avatar for Ejaz
0
87
Member Avatar for SonicSlayer

I’m having problems with my do-while loops and my while loop. Also my switch statement ends and does not loop to ask for another input. I’m confused. Any suggestion that can help me or send me one the right track I would appreciate it. This is the assignment: The Miskatonic …

Software Development algorithm java
Member Avatar for SonicSlayer
0
152
Member Avatar for shantuli

hi everyone, can anyone solve me the code for the java problem. i need a java programthat holds twenty integers in an array, loop though each cell sequentially and prints each number on the console. thank you very much. shantuli

Software Development java
Member Avatar for tigerxx
0
169
Member Avatar for hill0ster

If you type in employee ID, and then a character (other than s, h or c) including the enter key. You get a message that says, "Do you want to try again or quit?" "Type q or Q to quit any other key to continue." If you hit any other …

Software Development c++ perl
Member Avatar for Stack Overflow
0
242
Member Avatar for nicoletonyf

hello there, when I try to combine 2 arrays together it displays "0". I think I don't understand the concept of constant. This is my code: [code] #ifndef INTSET_H #define INTSET_H class IntegerSet { public: IntegerSet( int ); IntegerSet( const IntegerSet& ); IntegerSet unionOfIntegerSets( const IntegerSet& ); IntegerSet intersectionOfIntegerSets( const …

Software Development c++ display
Member Avatar for Stack Overflow
0
132
Member Avatar for BeyerCorpuz

[FONT=Times New Roman]Formatting Currency[/FONT] :lol: I would simply like to format a variable(WallboardCost) as currency. What is the easiest way to to this in Visual Basic 6. Thanks a lot. Chris B

Software Development visual-basic
Member Avatar for mnemtsas
0
155
Member Avatar for tendekai

#include<stdio.h> #include<conio.h> #include<string.h> FILE *fp1, *fp2; int count; struct record { char name[20]; int empnum; char depart[20]; float hours; float rate; }; void main() { struct record h; int acount=0,adcount=0,scount=0; float grosspay,totalg=0; float tax,totalt=0; float health,totalh=0; float pension,totalp=0; float netpay,totaln=0; float deductions; clrscr(); fp1=fopen("employ.dat","r"); fp2=fopen("payrol.dat","w"); count = 0; printf(" ""Page1\n"); …

Software Development c
Member Avatar for vegaseat
0
131
Member Avatar for freesoft_2000

hi everyone, I have a textpane using the default styled document. This textpane contains a icon and some formatted text. Next i have a file saved to my disk which is a document of another textpane. What i want to do is be able to append the two documents together …

Software Development email java
Member Avatar for freesoft_2000
0
124
Member Avatar for hill0ster

If you type in employee ID, and then a character (other than s, h or c) including the enter key. You get a message that says, "Do you want to try again or quit?" "Type q or Q to quit any other key to continue." If you hit any other …

Software Development c++
Member Avatar for Dave Sinkula
0
260
Member Avatar for Angiana

Hello everyone... im very new to Java... n im doing a java program 2 read from text files... the problem is after i read the 1st line ..the 1st number will be my max value... n after i read the second lines, there will be many values input by the …

Software Development java
Member Avatar for Angiana
0
146
Member Avatar for Dani

This might sound silly. But I'm working on a C# assignment for school right now, and I can't get a simple if-else statement to work. Isn't the syntax the same as in C++ or Java? I want to do one thing if a boolean variable is true, something else if …

Software Development c#
Member Avatar for guitarded
0
421
Member Avatar for grootjan

How do I activate debugging in my appliactions because when I activate "step into" the brakpoints are not recognized; the program executes without stopping at the breakpoints Regards John Sambo

Software Development
Member Avatar for guitarded
0
113
Member Avatar for nazanin_dnr

Hi everyone I have written an applcation and now its the step that I want to make user authorization ! but I don't know any thing about it ! if anyone knows please introduce me some articles or please guides me ! thanx for your help

Software Development java
Member Avatar for tigerxx
0
96
Member Avatar for tiberis

My teacher has told me I need a build file for my networking prodject. The problem? I have NO IDEA what a build file is, let alone how to implement it. Is anyone available to step me through it? :-|

Software Development java
Member Avatar for tigerxx
0
116
Member Avatar for mmr

Hi All, I am working with Internal Frames. I used JDesktopPane and added 2 frames to it. I made one frame visible and the other was setVisible(false). This happens when I first run the program(Only first frame appearing). Now, what I want is to make the second frame visible, when …

Software Development java
Member Avatar for tigerxx
0
146
Member Avatar for the b

I'm making a program that takes the words from one text or data file and transferes it to another. there are not supposed to be any spaces in the second file. I need to know why I can't make this code work. It would not be the completed code but …

Software Development c++ ios
Member Avatar for the b
0
328
Member Avatar for Anu

Hi again, since my last thread I proceeded a bit and in the meanwhile took a closer look on Mode13h. I started programming some simple games like Snake etc, but I'm stuck on a specific function I couldn't discover yet: I need a getch(); which aint actually waiting for the …

Software Development c
Member Avatar for vegaseat
0
230
Member Avatar for hill0ster

Please let me know why this is going into an endless loop if you enter a decimal point for your monthly salary, hours worked, or sales. Is there an easy fix? #include <iostream> #include <iomanip> using namespace std; #include <cstdlib> #include <string> bool getEmployeeData (int*, char*, int*, int*, int*, int); …

Software Development c++
Member Avatar for Narue
0
125
Member Avatar for jasweb2002

I need to write a class using a vector and this is my first time using vectors. But I have looked through several books/web pages and can't see why this thing won't compile. #include <vector> template <class el> class pQ { public: private: vector<el> a(1); }; Any ideas. There must …

Software Development c
Member Avatar for jasweb2002
0
100
Member Avatar for Diya

plz anyone can send me the code for Round Robin simulation ??? send that to [email]ur_friend_qau@hotmail.com[/email] plz its very urgent i got only 12 hrs plzzzzzzzzzzzzzzzzzzzzzz ALLAH HAFIZ

Software Development c++ email
Member Avatar for zaizch
0
163
Member Avatar for JoBe

Hi everyone, Ive got a question concerning an excersise I have to make in wich I use an array in a function: I have to manually fill an array with twenty numbers randomly and the array has to be used by a function, now, I know how to do this …

Software Development c++
Member Avatar for Narue
0
133

The End.