49,761 Topics
| |
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. … | |
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 = … | |
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 | |
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 … | |
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, … | |
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. | |
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, … | |
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" … | |
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. | |
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 … | |
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 … | |
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.. ;) ;) ;) ;) | |
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 … | |
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 … | |
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 … | |
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 … | |
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++ ?:-| | |
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 … | |
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 … | |
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 … | |
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 … | |
"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, … | |
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 … | |
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 … | |
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] // … | |
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 … | |
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 … | |
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 … | |
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 … | |
[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(); … |
The End.