49,761 Topics

Member Avatar for
Member Avatar for nayrb

I am making a lunar lander game, i have made the class and implementation file, but have no idea how to make the altitude reduce by the formular. Alt = time * velocity Could you also help me out with how to make time pass through the game, no idea. …

Member Avatar for thekashyap
0
973
Member Avatar for proxystub

cant seem to read from this my file "d.txt", i know this is quite simple code but its just not working, and yes file "d.txt" is in the same directory as the .cpp & .exe [code] #include <fstream.h> #include <iostream.h> #include <stdlib.h> int main() { char ch; //int check = …

Member Avatar for proxystub
0
120
Member Avatar for niyiment

I am new to c++ and i dont know where to start from and how to get materials on c++ from any site or member. thanks in andvance

Member Avatar for Lazaro Claiborn
0
81
Member Avatar for arfmal

I have a problem - to copy a string from a vector and put it into another vector. It's ok if i use a string variable, where this variable will be used as a temp variable between these vectors....But i do not know what is the best approach to copy …

Member Avatar for thekashyap
0
243
Member Avatar for nayrb

I wrote a program with classes. When in one file it works fine. But when i split them up into three the main program won't read the other two WHY? .H FILE [code=cplusplus] // FILE w.h #ifndef LUNAR_LANDER #define LUNAR_LANDER class lunar_lander { public: lunar_lander(float);//, float, float, float, float, float, …

Member Avatar for John A
0
107
Member Avatar for Lord Vespa

im writeing a mud rpg game in class and i need some examples of combat systems. ive jest started programing in C++ and im in way over my head so if anyone has some examples i would be realy grateful thanks.

Member Avatar for Lazaro Claiborn
0
171
Member Avatar for chubbywubba

My main has an unexpected end to the file and i am having problems finding the error. can anyone help? It also says where "case 81" is that i already used it but I have not. [code] void main () { HANDLE hOut; COORD NewSBSize; SMALL_RECT DisplayArea = {0, 0, …

Member Avatar for thekashyap
0
126
Member Avatar for Brent.tc

I've been working on a program (nothing big, or anything) and there are some things I'd like to work (That has nothing to do with the fact that there supposed to work :) Problems: 1 - Screen won't clear (This seems to be the most frequent question about c/c++ "ms-dos" …

Member Avatar for Brent.tc
0
157
Member Avatar for spacecowboy123

HI all, Does the U in at the end of 1234U signify that it is unsigned? The kind of number it is a uint64_t. Does this mean it is an usigned integer 64 bit? What does the _t at the end mean. Thanks for the help.

Member Avatar for Salem
0
98
Member Avatar for tikal777

Hi to DaniWeb. I've been checking out the forums from time to time to get help with C++. I'm a total beginner in C++, the only other language I have any knowledge of would be HTML, which is getting old. Anyways, I'm in a class that is requiring an assigment …

Member Avatar for tikal777
0
137
Member Avatar for evilsilver

ok guys and gals here's my delema, i have this code: all it basically does is define two classes, one that defines the stuff for the player and his actions, the other for the enemies (or monsters) the problem is that i have funtions in both that require i include …

Member Avatar for evilsilver
0
118
Member Avatar for rostom99

my teacher told us to give the input of the following output given..using c++ loop formula.. pls help me.. output: 1) * *** ***** *** * 2) * * ** ** ****** 3) ****** ** ** * * hoping for your help.. thanks in advance.. ;) ;) ;) ;)

Member Avatar for Infarction
0
76
Member Avatar for notfornothing21

I am just learning linked lists and I need to start off my inputing integers and outputing them in a sorted list. I have written a code and pretty confident that the code make sense, but maybe it is out of sequence is why it is not working? I am …

Member Avatar for Infarction
0
190
Member Avatar for nayrb

I am having a problem with accessor. How can i get it to read height? They are 3 files .h(CLASS) , .cpp(IMPLEMENTATION) , and another .cpp(PROGRAM). i tried putting a getHeight in the class and describing it in the implementation, but that did not work. I want the getHeight to …

Member Avatar for nayrb
0
122
Member Avatar for Laiq Ahmed

I want to generate the following pattern using for() loop only.... how can i do this i've tried but unfortunately failed to solve .... when user inputs 3 [COLOR=#008000]1 1 1 1 1 1 2 2 2 1 1 2 3 2 1 1 2 2 2 1 1 1 …

Member Avatar for Laiq Ahmed
-1
115
Member Avatar for RaCheer

I am writing a C++ program to convert feet and inches to meters and centimeters and vice versa. I am having a problem figuring out the conversions. What I have so far actually works...it gives me a result but my way of getting to that result is not the correct …

Member Avatar for WaltP
0
3K
Member Avatar for livingsword

i wish to use this java code in c++. [code] String bname[] = { "Unix Environment", "Programming in Perl", "Comp. Architechture", "Operating System", "Java Programming", "DIstributed OS","Database Management", "J2ME","Operating Systems", "Algorithms in C++"}; [/code] how do I initialize char array in c++ ?:-|

Member Avatar for John A
0
91
Member Avatar for jan1024188

Hello. I use Linux, and I have no experience in windows. I have to write a C++ program that checks if Java is installed. I have no idea how to check that (there is no directory such /usr/bin ). I need this for a Java app and I want check …

Member Avatar for Lazaro Claiborn
0
531
Member Avatar for nayrb

Hello, I am having problems with reading from a .h file to .cpp file it gives me a strange error i have gone over this thing 1000 times and can not figure out whats wrong. Could someone please help me? I am using dev.c++ compiler. I should mention i am …

Member Avatar for torbecire
0
89
Member Avatar for Dave256000

Using the skeleton below #include <unistd.h> // read/write #include <sys/file.h> // open/close values #include <string.h> // strlen int main( int argc, char *argv[], char *env[] ) { // C++ or C code } Write a C++ application myrm that removes (deletes) files passed as command line argument. Use only the …

Member Avatar for Dave256000
0
176
Member Avatar for covington_c

Im doing a calculator project for my c++ class but my operations dont compute properly and i cant quite figure out whats wrong any input would be greatly appreciated. [code=c] //Program Name: Calc //Author: Charles Covington //Date: Feb. 20, 2007 //Description : This is a simple calculator #include #include #include …

Member Avatar for WaltP
0
156
Member Avatar for youngone

"Develop a program that can be used to calculate the number of days between any two days from 1/1/1900 through 12/31/2099 The main program will call the same function twice- once for each date and have an integer returned to it each time. The function will prompt for a year, …

Member Avatar for WaltP
1
125
Member Avatar for MattEvans

Is it incorrect to use the precompiler like a complicated copy-and-paste tool? I've been working on a system where a few objects are processed according to exactly the same 'pattern' so to speak; BUT they are not related objects. Although it would be possible to bring some of them back …

Member Avatar for thekashyap
0
117
Member Avatar for Rimm

I am using Visual C++ 2005 in my laptop. When I run the program, the answer shows up on the output window (similar to the > command window) and within a second or two the window disappears. How can I fix this problem? The same happens when there is data …

Member Avatar for Rimm
0
75
Member Avatar for torbecire

The a.cpp file will not read from a.h, could someone please tell me why? I asked earlier but did not get much help due to bad posting. My apologies to all you who i have burdened with my rookieness(not a word). Hopefully i did it right this time. [code=cplusplus] // …

Member Avatar for Ancient Dragon
0
130
Member Avatar for Collapse Troll

Hi! When i was passing the test, i got this question: [quote] "You are asked to design classes for a board game system. The board has 8X8 squares. The board game will allow the user to play "Chess" and "Checkers". The GUI is done by another team; you have to …

Member Avatar for Collapse Troll
0
128
Member Avatar for RobertNashon

Hi I'am having a problem in debugging this code of mine .There is a problem in the execution of cl.e file. This is the code; [code=c] #include<iostream.h> #include<string.h> #include<conio.h> #include<stdio.h> #include<stdlib.h> #include<math.h> class hospital { char password; int telno,mobno,fax; char name[20],log,address[20], website[20],email[20]; public: hospital; int loging(); void menu(); class reception …

Member Avatar for dwks
0
192
Member Avatar for livingsword

i dont know if this the appropriate forum for this question, I wrote few programs on turbo c++ ide and they work perfectly fine. but when i try to compile the same code in openSUSE 10.2 , i get errors like : clrscr not recognised, clreol not recognised, gotoxy not …

Member Avatar for dwks
0
139
Member Avatar for zebra59

Here is the ? [B]To use a template construct, what phrase must come before the class definition?[/B] My friend said that should be the [B]parameter[/B], but think that its the [B]argument, [/B]Next ? is [B]in the statement [/B] [B]List<int> mylist; [/B]the word [B]int[/B] is known as the template _______________? I …

Member Avatar for Narue
0
71
Member Avatar for torbecire

[Torbecire] I want to get the a.cpp to read from the a.h file. But it won't, i have done this class thing before and it worked on another program but won't work on this. Help me out. [code=cplusplus] // File a.h #ifndef LINEAR #define LINEAR class linear { public: linear(); …

Member Avatar for Narue
0
150

The End.