Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
68% Quality Score
Upvotes Received
3
Posts with Upvotes
3
Upvoting Members
3
Downvotes Received
2
Posts with Downvotes
2
Downvoting Members
2
1 Commented Post

25 Posted Topics

Member Avatar for pac-man

hi guys, I'm designing a website - [url]www.pchristou.com[/url] - to showcase some of my work but am having an issue when using an image as the background. For some reason, when scrolling in Firefox its not smooth (in particular, when clicking the anchor links at the top) however, other browsers …

Member Avatar for pac-man
0
130
Member Avatar for pac-man

hi all, I'm a newbie to AJAX (spent most my time on the C++ forum) but I'm in need of some advice. I plan on building a web-application in PHP with AJAX functionality. Now, I've never touched AJAX before and wanted to know which route would be more convenient a) …

Member Avatar for kvprajapati
0
138
Member Avatar for pac-man

hi guys, I've created a function that returns the number of times a value resides in a container (in this case, vector). The user is able to specify were in the vector they wish to search for the value. [CODE] int number(int n, vector<int>::iterator start, vector<int>::iterator end) { int count …

Member Avatar for pac-man
0
235
Member Avatar for pac-man

Hi guys, just playing about with pointers and keywords and to my surprise, this code does not throw up an error... can anyone tell me why? [CODE] int main() { int *P = new int; *P = 50; cout << *P << endl; // output: 50 delete P; *P = …

Member Avatar for pac-man
0
132
Member Avatar for fadia

Try this: [CODE]int decrement (int n) { if (n<0) return n; cout<<n; decrement(n-1); return n; } [/CODE]

Member Avatar for fadia
0
137
Member Avatar for pac-man

Hi guys, I found this thread ([url]http://www.daniweb.com/forums/thread19814.html[/url]) that gave me guidance on this topic but I wanted to further develop my understanding. I understand that in Java, everything 'passes by value', even references. That is, a copy of the value is passed to the parameter so the original value is …

Member Avatar for JamesCherrill
0
196
Member Avatar for pac-man

Hi guys, I understand the difference is that the params of ctor 2 are declared const with n being passed by reference. However, I don't seem to understand what difference having these params (n and a) declared constant with n being passed by reference makes? I mean, I'd understand the …

Member Avatar for Excizted
0
134
Member Avatar for inmar

1. Have you tried [CODE] string command= "C:\\Program Files\\Microsoft\\Exchange Server\\Bin\\eseutil.exe\" /mh \"F:\\fsg\\edb\\mailbox database.edb\" | find \"Log Required\" >output.txt";[/CODE] Deleting the first "\ before "C:\\ etc..? 2. I don't think it's necessary to specify the full path. If your app.exe is in the same folder as your program, you can simply …

Member Avatar for donaldw
0
430
Member Avatar for manosha

[QUOTE=manosha;1084434]I need to add these functions also (I tried but there were many errors :S )  void replace (int x, int y): a function that is used to replace an existing array value x with another value y.  int count (int ele): a function that is used to …

Member Avatar for DanielGreen
-2
132
Member Avatar for thewonderdude

I think its erroring because its expecting a cstr not a std::string try [CODE]strtok(holdInput.cstr(), " :");[/CODE]

Member Avatar for jonsca
0
151
Member Avatar for Ruffio1981

Hi there, Why not just create 2 functions, one for adding and one for subtracting? That way, you can add/subtract the relevant number once you do have it. Something like: [CODE] // Assuming you want to return an int... int add(int &value, int addition) { value = value + addition; …

Member Avatar for DanielGreen
0
111
Member Avatar for BobFX

I'd suggest reading up on "header" files. To assist, rename the following code into a file named EventListener.h [QUOTE=BobFX;1084390] [code]#include "stdafx.h" using namespace System; class EventListener { long mRef; public: EventListener() { mRef = 0; } };[/code] [/QUOTE] Rename the following as main.cpp and add the following line #include "EventListener.h" …

Member Avatar for BobFX
0
143
Member Avatar for Japus

Would it not work if you just had 2 separate vectors? One of type Potion and another of type Equipment? [CODE]vector<Potion> p; vector<Equipment> e;[/CODE]

Member Avatar for Japus
0
728
Member Avatar for kevinkev
Member Avatar for pac-man

Quick q, What function takes precedence with a template function vs a non-template function? I set up the following code but my result had the following output Template Template even though a guide I read said it should read: Template Non-template [CODE]// Testing template function vs non-template function to see …

Member Avatar for mrnutty
0
119
Member Avatar for PDB1982

Try this instead of [CODE]string letterGrade(double studAvg) { if (studAvg > 95.0) return "A"; else if (studAvg > 90.0) return "A-"; else if (studAvg > 85.0) return "B"; else if (studAvg > 80.0) return "B-"; else if (studAvg > 75.0) return "C"; else if (studAvg > 70.0) return "C-"; else …

Member Avatar for Zjarek
0
252
Member Avatar for tango2009

When you say you can't get it to work...is the list returning empty? If so, it may be because you're passing a copy of the list into the parameter. Try passing the list as a reference instead.. [CODE] void Level::printNodeList(list <graphNode> &nodelist) [/CODE]

Member Avatar for pac-man
0
107
Member Avatar for pac-man

[CODE]class Car { public: Car(string name, const int wheels = 4){} private: string name; }; void main() { Car("Ford",3); // Why can I put in a 3? } [/CODE]

Member Avatar for pac-man
0
111
Member Avatar for pac-man

I'm trying to configure my application so that a user without wxWidgets installed on their computer can compile the code. I'm not sure how to do this although I believe I have to use .DLLs? Has anyone got some info on how I can do this? Thanks in advance.

0
53
Member Avatar for pac-man

Hi guys, I'm banging my head against the wall with this one. I want to sort a <string> vector which contains the following: "Pen 0.99" "Pen 0.99" "Paper 1.50" "Pad 1.99" "Paper 1.50" Into a vector which would sort it as follows: "Pen 1.98" "Paper 3.00" "Pad 1.99" I know …

Member Avatar for mrPaul
0
332
Member Avatar for pac-man

Hi guys, I have a static vector which holds objects of a class. I want this vector to be singleton i.e. be the only vector of this type which will indefinitely store the relevant objects. Unfortunately, a problem arises whereby, when I access the vector from a different class, for …

Member Avatar for pac-man
0
858
Member Avatar for pac-man

As the title says please. The issue I'm having is I've got a class which holds the vector. When I create a new instance of the class I assume a new vector is also created which results in the vector losing all its contents?

Member Avatar for pac-man
0
177
Member Avatar for pac-man

Hi guys, I was hoping someone could explain to me how I would go about grabbing a pointer/reference to my variable 'textName' contained within the Reports class, (some code omitted to try to simplify the scenario) [CODE] //Reports.h class Reports : public wxPanel { public: void AddStudent(wxCommandEvent & event); wxTextCtrl …

Member Avatar for pac-man
0
108
Member Avatar for pac-man

I'm trying to filter the contents of a vector of type string, based upon a regular expression. NB: I'm using the boost::Regex library So far, I've got the following [CODE] boost::regex r("[A-Z][A-Z]{3}<\\/t|[A-Z]{3}<\\/t|[A-Z\\.]{3}<\\/t"); for(int i = 0; i < vStream.size(); i++){ if(boost::regex_match(vStream[i],r)) cb->Append(vStream[i]); // cb is a combobox for my GUI …

Member Avatar for pac-man
0
57
Member Avatar for pac-man

Hi there, I am relatively new to C++ and was hoping someone could provide me with some guidance, I have a .txt file that contains a heap of HTML and I wish to extract a small portion of [B]dynamic[/B] text from differing places. For example: [U] .txt file before filter[/U] …

Member Avatar for pac-man
0
160

The End.