49,757 Topics

Member Avatar for
Member Avatar for onemanclapping

Hi, I'm doing a program that has a class called Liga. That class has a vector with 'Equipa's. Liga has a vector called 'pessoas' which I want to access inside a function in each Equipa, is this possible? for example: Liga.h [CODE]... vector<Pessoa*> pessoas; ...[/CODE] Equipa.cpp [CODE]... void Equipa::mostraStaff() { …

Member Avatar for onemanclapping
0
113
Member Avatar for scotchfx

If in a class method I pass in a list: std::list< regmatch_t* >& pm_list; and dynamically allocate memory for an array (of type regmatch_t) which is then added to the list as a pointer: regmatch_t* pm = new regmatch_t[ num_subexpressions ]; pm_list.push_back( pm ); will the list destructor automatically deallocate …

Member Avatar for Narue
0
129
Member Avatar for manzoor
Member Avatar for e_agam
0
76
Member Avatar for transplantedNYr

I have to take the following code and make it tail recursive. I am not looking for the answer, but how to find the answer. How to work through this to understand what I need to do. Our hint is that we can change the parmeters of the function, like …

Member Avatar for transplantedNYr
0
93
Member Avatar for DemonGal711

FIXED - I'm getting a parse error somewhere in this section of code before the else and I can't see it. Please help someone. [B]NEED HELP HERE -[/B] Okay, I'm apparently getting a parse error somewhere in this code. Any help? All the errors are listed as "Parse error before …

Member Avatar for stilllearning
0
546
Member Avatar for Th3_uN1Qu3

Hey, it's me again. This time with a thing that has been bugging me for months and i still haven't gotten around to solving it. I need to install a font without rebooting the computer. Sounds simple but i have to do it in code or with a batch file, …

Member Avatar for Th3_uN1Qu3
0
849
Member Avatar for unbeatable0

Is there a way to #define something as a #warning? I tried using the following code, but it gives me an error: 'warning' undeclared (first use this function) This is the part of code where the error appears: [code=c++] #define something #warning This is not a standard function! int main(void) …

Member Avatar for Salem
0
211
Member Avatar for acoxia

Hello i have a project to write a program that takes 2 binomials from a text file then factor them and output it into another text file. I'm curious on how to begin going about this do i take the 2 binomials such as (x+5)(x+9) and put them in a …

Member Avatar for acoxia
0
148
Member Avatar for saneeha

I am using getfilepathname() to get the path of a particular file. but it returns the path of the project. i am using findfirstfile() and findnextfile() to get the handles, but still it doesnot show the directory in which handle is present... can any one help me on this issue …

Member Avatar for Salem
0
103
Member Avatar for NinjaLink

I have the whole code written for what I want to do, but the only problem is, on my Daily_Average function, I want to print the average of the scores occurring Day 3, but I'm getting average of ALL scores together as one. Here is an example of the scores …

Member Avatar for NinjaLink
0
105
Member Avatar for pads

this is my program i am getting a error while compiling it can someone help me... error is ----- Build started: Project: paddy, Configuration: Debug Win32 ------ Compiling... manager.cpp c:\documents and settings\others\my documents\visual studio 2005\projects\paddy\paddy\manager.cpp(51) : error C2664: 'Pensioner::Pensioner(char *,char *,char *,long,char *)' : cannot convert parameter 1 from 'std::string' …

Member Avatar for ArkM
0
2K
Member Avatar for saneeha

I need to extract complete path for a file givne the file name. I am using the function GetFullPathName() but it only appends the current directory of the project with the file name.. Is there any modification or some other function which can help? I am using visual studio 2005 …

Member Avatar for ArkM
0
245
Member Avatar for c++ prog

hi, my problem is about socket programming. My code below only connects the client to the server, and it works just fine. However, I should create a 2player game which of course require the interaction of the 1st and 2nd player. The problem here is that they really don't interact …

Member Avatar for c++ prog
0
125
Member Avatar for Student_ABC

Hi. I'm new here and would appreciate any help you can give me. I am a college student and I'm supposed to do this assignment where I take data from one txt file and put it into another. This is step one of a larger project. I have some code …

Member Avatar for Student_ABC
0
146
Member Avatar for sidatra79

Hello everybody, I am looking for some clarifications/definitions regarding some special concepts for a better OOP design.. I already have some idea for some of them, however I would like to hear what more experienced programmer have to say. :D So lets start... [code] Could u provide a short definition …

Member Avatar for sidatra79
0
113
Member Avatar for thenic

ok i just startet coding c++ and ofc im geting alot of errors. but until now ive been able to fix them myself but when i try to debug my program it says misplaced else and i just cant find out how to get it to work. so well heres …

Member Avatar for thenic
0
99
Member Avatar for JackDurden

So if I have a header file like this: [CODE]template<typename T> class snake { public: void example(); private: T *start_Ptr; };[/CODE] and then a source file like this: [CODE]#include <iostream> #include <stddef.h> #include "foo.h" using namespace std; template<class T> struct node { T data; node *next; }; template<typename T> void …

Member Avatar for Sci@phy
0
86
Member Avatar for uae_uae99

hi everone ,actually i need ur helps. i have to submet my final project next week on 14/10 and i didnt star yet .therefore, i wanna star this week but i dont have enogh ideo 4 my topic (my topic is make program for sell and rant a car ) …

Member Avatar for VernonDozier
0
87
Member Avatar for Korg

I'm very new to C++ , and if anyone could, could they give me the code for just a simple program, that would click a link on a webpage continuasly for you :p Thanks :)

Member Avatar for chococrack
0
177
Member Avatar for skatamatic

Hi, I'm not sure I understand my teacher properly, but he wants me to use the CCTOR of class CPt in the CCTOR of class CCanvas to fill a dynamically allocated array. I'm at a loss of how to call it...maybe a little code will help this make more sense: …

Member Avatar for skatamatic
0
172
Member Avatar for Ellisande

While working on my CS project, I coded the following line: [code] if(...*stuff* || *morestuff* || *evenMOREstuff* || (strcmp(argv[5], "yes") && strcmp(argv[5], "no"){ cout << "Improper arguments." exit(1); } else{ do more stuff} [/code] Where argv[5] is a program argument supplied by the user. Either a yes or a no …

Member Avatar for Narue
0
94
Member Avatar for n8thatsme

Ok, so I have an array of objects that have 3 get functions. Get last name, get first name (both strings) and get salary. What I'm trying to do is get a user to enter First name and Last name and it search the array for the persons first and …

Member Avatar for n8thatsme
0
197
Member Avatar for skatamatic

I'm not too sure why I'm getting memory leaks...hopefully someone here is wiser than me, and can help me find it :P . [code=cplusplus] #include "Canvas.h" CDrawer CCanvas::gCanvas(RGB(0,0,0), 1); int const GREEN(20000),BLUE(50), RED(200), THICK(3); CCanvas::CCanvas(void): _iSize(0), _cptPoints(0) { } CCanvas::CCanvas(CCanvas const & tmpCanvas): _iSize(tmpCanvas._iSize) { if (_iSize > 0) { …

Member Avatar for ivailosp
0
264
Member Avatar for hapiscrap

[code=cplusplus] #include <iostream> #include <fstream> using namespace std; int main() { int numberofemployees; int employeeid, hoursworked; float hourlyrate, grosspay, taxamount, netpay; const float TAXRATE=0.10; ifstream fin("C:\Dev-CPP\employee.txt"); while (!fin.eof() )} fin >> employeeid >> hoursworked >> hourlyrate; cout<<"EMPLOYEE ID IS: "<<employeeid<<endl; cout<<"THE HOURS WORKED ARE: "<<hoursworked<<endl; cout<<"THE HOURLY RATE IS: "<<hourlyrate<<endl; …

Member Avatar for Sky Diploma
0
214
Member Avatar for chanda gul

Hi, I am trying to list all the files in a drive. when i use "*" instead of "C:\*" in findfirstfile() function then it works fine and lists all the files in the current directory but it does not work when i use "C:\*" and does not list files. can …

Member Avatar for chanda gul
0
145
Member Avatar for sleepytoast

first time here so I'm sorry if I didn't do something correctly. I need to find the total number of floors, rooms on each floor, how many empty rooms there are, occupied rooms on each floor, find occupancy rate, and the "Heartbreak Floor". Which has to display the floor with …

Member Avatar for sleepytoast
0
101
Member Avatar for TheBeast32

Hi, I'm taking a programming class at my school. My teacher gave us a pdf that said "..You will be writing a program that can read a bitmap and insert a secret message into the bytes of the picture in a retrievable way using the picture as a cipher and …

Member Avatar for TheBeast32
0
124
Member Avatar for mrrko

Hi guys! Well they gave me this work, that says as follows: Write a program to score the paper-rock-scissor game. Each of two users types either P, R, or S. The prgram then announces the winner as well as the basis for determining the winner: Paper covers rock, Rock break …

Member Avatar for mrrko
0
2K
Member Avatar for kudusan

i have a problem creating games with C++, if anyone has a source code in C++, please share with me, i need help, simple game is okay e.g: snake, arkanoid i just need a source code for a simple game, without open GL or something like that (because i can't …

Member Avatar for Salem
0
298
Member Avatar for siddhant3s

Hi, and here i am throwing a "not the exact version" of my problem, but if this is been solved, my problem is done. Lets suppose i am building a application in c++ that will simply display the content of a text file. I absolutely can make the app take …

Member Avatar for siddhant3s
0
112

The End.