No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
is this good practise or even possible as i'm not on my comp. [CODE] class C3dshape { private: int mLength; int mWidth; int mDepth; public: int getlength(); int getwidth(); int getdepth(); void setvalues(); }; int C3dshape::getlength() return mLength; int C3dshape::getwidth() return mWidth; int C3dshape::getdepth() return mDepth; void C3dshape::setvalues() { length … |
|
I can't decide what data structure to use for a program I'm making. the program I'm making is a football table, the variables used so far are; string team; int played = 0, goalsfor = 0, goalsagainst = 0, goaldiff = 0, win = 0, draw = 0, lose = … |
|
Re:
i have a question,it's about header files, the header files i always use is stdio.h and conio.h.... how can i use other header files like iostream, c time, etc.. whenever i use them and compile the source code, bad header files always exists,. Can you help me? Thanks a lot |
|
Re:
hey guys i just want to ask for your help about the source code of ROCK PAPER SCISSORS game on c++, the rules of the game is that, the user and the computer will battle, the game consist of 5 rounds ONLY,and first player who score 3 out of 5 … |
|
i'm trying to use string stream to get data from an input file. the program works until it get's to adding the elements to the array. i'm still not completely sure how to make use of stringstream yet or if i'm using it right. [CODE] ifstream ipf; ipf.open(test.txt); char c; … |
|
Re:
Hello. I have some problems. 1.With for cycle. This is my code: [CODE]#include <iostream> #include <fstream> int main () { int i; int i2; char sentence [200]; char repeat; ofstream file ("file.txt", ios::app); for (i=0; i<1;) { cout << "Enter sentence (max. 200 symbols)\n"; cin >> sentence; if (!file) { … |
|
Re:
hello i want to create a C++ program in this view 1 2 3 4 5 6 7 8 9 |
|
i keep having a problem with my arrays. when i set them up and try to re-use them elsewhere i only get the last part of the array and all the rest are pointers. [CODE] typedef int* ptr; ptr sub;//dynamic int count = end - start; //the sub-array's size is … |
|
I seem to be having a few problems with pointers at the moment. At the moment I have a char pointer as a parameter in one class. The function is being used in another class and is being used to get an input file. [CODE] ClassA* CAptr = new ClassA; … |
|
hi, i've writen a function to get a sub array from another array [code] subarray(int* Array, int start,int end) { typedef int* ptr; ptr sub; sub = new int[end]; for(int i=start; i<end; i++) { int j = 0; Array[i]=sub[j]; j++; } for(int l=0; l<end; l++)//added as an after thought cout<<sub[l] … |
|
hi i'm trying to write a program that compares and manipulates certain characters from a string. heres the bit i'm having trouble with. [CODE] char c; if(c <= a && c >= x)//obvious error //do something [/CODE] is there anyway i can get this to check if 'char c' lies … |