49,761 Topics
| |
Within this code I would like to save the data which was input through a function "SavePlayer", but it doesn't work. The compiler "says" that object "a" ist not known. Probably the bold line [CODE][B][I]a.SavePlayer(manyPlayer,Player a); [/I][/B][/CODE]is wrong, but I have no idea how to solve the problem. Maybe someone … | |
does anyone have any note on rewriting C/C++ programs in Python?? google and bing give me the exact opposite, and I've got a headache from searching... please note that I can't read C++ if you need the program I'm rewriting, please let me know | |
I'm passing a this pointer in my constructor initialization list for use by a base class and VC9 gives me this warning about it... main.cpp(124) : warning C4355: 'this' : used in base member initializer list The program runs perfectly as compiled by VC9 Pro or Code::Blocks 10.05. In Code::Blocks … | |
In all the new IDEs when using open and close curly brackets the auto-formatting usually indents, and uses the extendable block (with the + sign) even if it is not necessary. For example, I like when all my functions have there own little extendable block but when I place them … | |
Hello Everyone My background: Civil/Structural and Mechanical Engineering. I work as a Structural Engineer designing bridges. I would like to develop a program that analyzes and design structures but do not know much about software development. I have created a library of spreadsheets that are very powerful and when working … | |
i've downloaded the last version of boost(1_47_0) but i don't know how to build it, i tried to find a tutorial on google but that didn't help much because it was for a very old version and some thing changed. anyway, my compiler does have minimal support for C++0x, will … | |
Hello all, I have an issue with a class I am writing which is supposed to be able to multiple 2 matrices together. The issue I am having is not the actual multiplication (That bit works, thanks for the pointers yesterday). The problem, or so I assume, is with my … | |
[CODE]/* * hello.c * This is a simple, introductory OpenGL program. */ #include<stdlib.h> #include <GL/glut.h> #include<iostream> #include<fstream> using std::fstream; using namespace std; void draw(void) { /* clear all pixels */ char fileName[] = "house1.txt"; fstream instream; instream.open("c:/house1.txt",ios::in); if(instream.fail()) return; glClear (GL_COLOR_BUFFER_BIT); GLint numstrip,numlines,x, y; instream>>numstrip; for(int j=0;j<numstrip;j++) { instream>>numlines; glBegin(GL_LINE_STRIP); … | |
[CODE] #include<stdio.h> #include<conio.h> void hello() { printf("\nHELLO\n"); } int main() { hello(); hello(); hello(); hello(); getch(); return 0; } [/CODE] If I run this code on a compiler,how many processes and how many threads will be running on the compiler and which ones? Does a duplicate function call consist another … | |
Ok how do I change the texts color without changing all the couts to printfs and without using system("color hex") | |
Sorry about the typo in title. Ok my school is addicted to making us mad and have blocked command promp that I brought my copy from home on a floppy disk and it blocked me. So what I need is a few alternatives for these: cls - clears the screen … | |
Detail on command line arguments with sample program to simulate the following DOS commands using cmmand line arguments - 1. copy 2. type 3. del 4. dir 5. rd | |
Do you have any loading screen coded in c++ graphics?? Pls. I need some. | |
Our teacher made us make a program that computes midterm grade. I have made my code already. My problem now is that whenever i run my code, halfway through the end appears a debug error saying that i was using a variable(TotalCS) that isn't declared. but it is actually declared. … | |
Within a function a vector could be given back via "return". Example: [CODE] vector<int>myvector() { vector<int>myvector; return myvector; } [/CODE] Better would be to work with a reference, e.g.: [CODE] vector<int>(&myvector)() { vector<int>myvector; } [/CODE] But this reference doesn't work. Does anyone have an idea what the correct code would … | |
ok all I need is to do is put qoits in cout. Like cout<<"She said"this""; or something like that. It is not dissus able I need quotation marks in it. (makeing JavaScript thing from inside program with user imput.) Just tell me how to do it instead of alternative ways … | |
I'm trying to mix it up with operator overloading and I can figure out what I'm doing wrong. Here's the code: [CODE]#ifndef TEST_H #define TEST_H using namespace std; template <typename T> class Test { private: T number; public: Test(T); friend Test operator+(Test<T> &a, Test<T> &b); friend ostream& operator<<(ostream& out, const … | |
[CODE]#include<stdio.h> #include<malloc.h> struct node{ int info; struct node *link; }*start; void main(){ start=NULL; int n,i,el; printf("Enter the no. of elements u want 2 enter"); scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&el); createlist(el); } void createlist(int data){ struct node *q,*tmp; tmp->info=data; tmp->link=NULL; if(start==NULL) start=tmp; else {q =start; while(q->link!=NULL) q=q->link; q->link=tmp; } } struct node *q; … | |
Okay, so my problem is that I'm making a program that identifies whether the user input is a letter, a number between 0-9 or a symbol. This is what I have so far: [CODE]#include <iostream> #include <iomanip> #include <windows.h> #include <string> using namespace std; int main() { char variable; cout … | |
dos commands through Cpp program copy,type,del,dir,rd | |
Hi I'm having a lot of problems with this homework problem due tomorrow. The assignment is to make a program that can read data from a file and give out the wind chill, average temperature, average air speed, and average wind chill. It must also reject data that has a … | |
I attempted to overload the == operator for one of my classes, I even copied a previous implementation of it, but now that I am using pointers it refuses to function properly here is the relevant code (there is a lot so I will provide more if need be) [CODE]#ifndef … | |
Hi I am trying to assign 5 people various objectives between day0 and day13. However the output is not correct and goes fuzzy in the second half of the output. This is my code: [CODE]for(int x=1, y=0; y < 5, x < 15; x++, y++) { array[x][y] = objectives[y]; if … | |
ok all I need is to learn how to convert a char variable into a acsii byte and back again. €£¥$ Edit: I know about typecasting or something and it's not exactly what I need because I wat to store the new variable in a int vareuble and I don't … | |
Please help me with my problem in algorithm coding.. the error says no matching function call .. i attach the picture in this thread hoping u help me :) | |
Project: Binary Tree ADT Transformers: 1. Add Node (You may follow BST rules for adding and deleting) 2. Delete Node Observers: 1. Node Count 2. isRoot 3. isParent 4. isChild 5. isSibling 6. isAncestor 7. isDescendant 8. isLeaf 9. Indegree 10. Outdegree 11. Traversals (pre, in, post, level-order) .CPP CODE … | |
What is the meaning of using dynamic_cast without any error handling? Like [code] struct base { virtual void testing() { std::cout<<"base"<<std::endl; } }; struct derived : public base { virtual void testing() { std::cout<<"derived"<<std::endl; } }; int main() { base baseInstance; derived derivedInstance; base *bp = &derivedInstance; base &br = … | |
Hello, I am having an issue with C++. I am relatively new to this language. The issue I am having is that I am unable to use a variable declared as private in my class. Definition: [code] class Matrix { public: Matrix(void); Matrix(int rows, int cols); Matrix(const Matrix& m); ~Matrix(void); … | |
[code] void testRR(std::string &A); [/code] [code] void testRR(std::string &&A); [/code] Which one is better? && is more flexible than &, should I choose && rather than &? Thanks |
The End.