49,762 Topics
![]() | |
How is it possible to get a menu where you rightclick on the Form ? I am not sure if this is the contextmenu. I tried to add this to the Form and also some components to it but that did however not work. | |
hey everyone. i'm fairly new to programming and right now i'm taking a clss where i have no idea what is going on but anyway if someone can help me write a small simple code for a small simple program where i hav to use transducer i can paypal you. … | |
If I have a bunch of structures defined within a class header file but outside the scope of the class how would I set a SETTER function to change the values. [code] struct VoltageValues { float Vcc; int TblkLoopEnb; double Blah; }; class TblkArray { public: TblkArray(); ~TblkArray(); struct VoltageValues … | |
Hi, I am new to C++ and trying to write a function that returns a pointer to a structure. I have a header file as follows. [code=cplusplus] class Blah { public: struct Values *getValues(); struct Values { int A; int B double C; } } My class file is as … | |
I wrote the following program with the instructions in the top comments: ( I am using visual studio on vista) [code=cplusplus] #include <iostream> using namespace std; int main() { int num1, num2; int total = 0; cout << "Please enter an integer between 0 and 100: "; cin >> num1; … | |
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() { … | |
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 … | |
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 … | |
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 … | |
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, … | |
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) … | |
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 … | |
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 … | |
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 … | |
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' … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 ) … | |
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 :) | |
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: … | |
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 … | |
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 … | |
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) { … | |
[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; … | |
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 … |
The End.