49,761 Topics

Member Avatar for
Member Avatar for Sunshine2011

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 …

Member Avatar for dluz
0
100
Member Avatar for Tcll

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

Member Avatar for JoshuaBurleson
0
2K
Member Avatar for Frederick2

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 …

Member Avatar for mike_2000_17
0
275
Member Avatar for sergent

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 …

Member Avatar for dospy
0
98
Member Avatar for Muel12

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 …

Member Avatar for Muel12
0
152
Member Avatar for dospy

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 …

Member Avatar for dospy
0
149
Member Avatar for Will Gresham

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 …

Member Avatar for Fbody
0
152
Member Avatar for khalid_farooq

[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); …

Member Avatar for gusano79
0
616
Member Avatar for swissknife007

[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 …

Member Avatar for gerard4143
0
184
Member Avatar for Zssffssz

Ok how do I change the texts color without changing all the couts to printfs and without using system("color hex")

Member Avatar for Narue
0
202
Member Avatar for Zssffssz

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 …

Member Avatar for Narue
0
135
Member Avatar for sanuphilip

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

Member Avatar for dospy
-1
341
Member Avatar for etangryk08
Member Avatar for Evilfairy
0
396
Member Avatar for ayesha08

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. …

Member Avatar for Evilfairy
0
235
Member Avatar for Sunshine2011

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 …

Member Avatar for vijayan121
0
156
Member Avatar for Zssffssz

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 …

Member Avatar for vijayan121
0
103
Member Avatar for NoUserNameHere

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 …

Member Avatar for vijayan121
0
71
Member Avatar for ravi543

[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; …

Member Avatar for ravi543
0
98
Member Avatar for Kron

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 …

Member Avatar for limaulime
0
91
Member Avatar for sanuphilip
Member Avatar for Richiemiz

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 …

Member Avatar for WaltP
0
523
Member Avatar for ThuggyWuggy

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 …

Member Avatar for ThuggyWuggy
0
6K
Member Avatar for ksm092

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 …

Member Avatar for ksm092
0
111
Member Avatar for ksm092
Member Avatar for Zssffssz

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 …

Member Avatar for Fbody
0
148
Member Avatar for FRGT/10

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 :)

Member Avatar for homeryansta
0
307
Member Avatar for FRGT/10

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 …

Member Avatar for homeryansta
0
236
Member Avatar for stereomatching

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 = …

Member Avatar for stereomatching
0
235
Member Avatar for Will Gresham

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); …

Member Avatar for JasonHippy
0
160
Member Avatar for stereomatching

[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

Member Avatar for stereomatching
0
122

The End.