Posts
 
Reputation
Joined
Last Seen
Ranked #800
Strength to Increase Rep
+5
Strength to Decrease Rep
-1
100% Quality Score
Upvotes Received
2
Posts with Upvotes
2
Upvoting Members
2
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
2 Commented Posts
~20.0K People Reached
Favorite Tags
Member Avatar for Carrots

Hi, I am trying to a play a .wav file in a C++ program. I think my code is OK, but when it plays, it plays the default windows 'error' sound, not my .wav file. This is the program: [code] #include <iostream> #include <windows.h> #include <mmsystem.h> #pragma comment(lib,"Winmm.lib") using namespace …

Member Avatar for pseudorandom21
0
6K
Member Avatar for Carrots

Hi, I am new to C# and Forms/GUIs. Basically I am trying to pass a value in a textBox to my programs program.cs file where I can apply my programs logic, but I'm stuck with how to do this. To get started all I am making is a form which …

Member Avatar for Carrots
0
2K
Member Avatar for Carrots

Hi there, I'm completely new to Java. I am trying to use [I]import[/I] in a project, but despite using what I think is the right code, my application fails to build. When I build my app, it builds and runs fine, but I want to use [I]JFileChooser[/I], so add this …

Member Avatar for Carrots
0
103
Member Avatar for Carrots

Hi, I have an expression tree in which the nodes are operators (union, intersection etc represented by a string "/u") or the nodes are std::sets. How could I access the std::set's values in order to carry out the tree evaluation using the operator functions(set_union(), set_intersection() etc) ? The expressions are …

Member Avatar for arkoenig
0
161
Member Avatar for Carrots

Hi, I am starting to try and create windows forms using C# in Visual Studio 2008. I added a button to my form, and when I clicked it, the event handler code was generated as expected: [code=c#] private void button1_Click(object sender, EventArgs e) { } [/code] The book I am …

Member Avatar for marketingmaniac
0
181
Member Avatar for Carrots

Hi there, I am passing command line arguments to a program. I know traditionally people declare argc and argv like this: [code=c++] int main(int argc, char *argv[] [/code] but I need to pass bigger numbers into my program (type long long). Is it OK to use the following: [code=c++] int …

Member Avatar for Salem
0
154
Member Avatar for Carrots

Hi, I have in my database the location of some images I want to display, all formatted as: [quote] ../images/products/1.jpg ../images/products/1.jpg [/quote] I'm trying to diplay them in a webpage but get the following error: [QUOTE] x Warning: substr() expects parameter 1 to be string, array given in C:\xampp\htdocs\mysite\index.php x …

Member Avatar for Encrypted
0
2K
Member Avatar for Carrots

Hi, I was wondering if anyone can see why the substr_replace() function isn't replacing the 'XXXXX' with the random integer I am creating in the script below: [code=php] <?php $password = rand(12345,98765); $stringtoparse = 'Your new password is XXXXX'; substr_replace($stringtoparse,$password,18); echo $stringtoparse; ?> [/code] When I run this, I still …

Member Avatar for cwarn23
0
98
Member Avatar for Carrots

Hi there, Looking for some advice regarding the following hierarchy structure: [url]http://i40.tinypic.com/9a1us0.jpg[/url] I'm storing base class pointers in a std::list in my program: [CODE=c++]list<Vehicle*>mylist[/CODE] Is it possible for me to use Pure Virtual functions in the base class? For example: [code=c++]virtual int getMPG() = 0;[/code] Seems fine, as all derived …

Member Avatar for Ancient Dragon
0
109
Member Avatar for Carrots

Hi there, I have a problem in that my derived concrete classes are loosing the data members which are part of my derived classes. I have wrote a simple program to show the problem. [B]GrandParent.h :[/B] [code=c++] #ifndef GRANDPARENT_H #define GRANDPARENT_H using namespace std; #include <string> /******************************************************** Abstract base class …

Member Avatar for Carrots
0
190
Member Avatar for Carrots

Hi, I'm having trouble understanding how I should use pure virtual functions in my inheritance tree. I've drawn a class diagram which shows what I'm trying to achieve: [img]http://i42.tinypic.com/2qjdttd.jpg[/img] Here is what I've written: [B]main.cpp[/B] [code] #include <iostream> #include <string> #include <list> #include "base.h" using namespace std; int main() { …

Member Avatar for mrnutty
0
128
Member Avatar for Carrots

Hi, I was trying to display an image in a thread, but despite using [img][/img] tags, it just parses the link. Is there a way of posting an image in the post/thread? Thanks a lot!

Member Avatar for Dani
0
122
Member Avatar for Carrots

Hi there, I'm trying to return base class pointers from the two classes 'base' and 'child', but I keep on getting a build error of "1 unresolved externals". I think it may be because I am linking all the files together incorrectly. When I comment out the problem line in …

Member Avatar for Ancient Dragon
0
237
Member Avatar for Carrots

Hi, I have been wrestling with this program all day and am looking for some help. I have never separated a program up before into separate files (main.cpp, base.h and base.cpp). What I'm trying to do is call a function from main() and have that function return a pointer to …

Member Avatar for Carrots
0
158
Member Avatar for Carrots

Hi there, I am trying to read values from a .txt file using stringstreams and plan to enter the values into a map, I am reading into a buffer, but it contains spaces and I believe a character which represent the end of line. Here is my program so far: …

Member Avatar for Narue
0
185
Member Avatar for Carrots

Hi, I'm trying to construct my first Doubly Linked List, but am having trouble compiling. This is my program: [B]main.cpp :[/B] [code=c++] #include <iostream> #include "node.h" #include "doublylinkedlist.h" using namespace std; int main() { system ("PAUSE"); return 0; } [/code] [B]node.h :[/B] [code=c++] class Node { public: Node *pointertonextnode;//pointer to …

Member Avatar for jonsca
0
350
Member Avatar for Carrots

Hi, I have a web site. On index.php I have a HTML link to admin/admincp.php By simply adding a htaccess file to the directory 'admin', will the admin directory and it's contents be fully protected? I only want it to be possible for me to access mysite.com/admin/admincp.php, because I am …

Member Avatar for Carrots
0
139
Member Avatar for Carrots

Hi, I'm making a simple forum. When a user register's, I trying to create their join date. [code] CREATE TABLE Users ( userName varchar(15) NOT NULL, registrationDate datetime default NULL ) [/code] and then have MySQL automatically set that value: [code] $sql = "INSERT INTO Users (userName, registrationDate) VALUES ('".$username."' …

Member Avatar for Carrots
0
120
Member Avatar for Carrots

Hi, I have a linked list which stores base class pointers (which point to derived type objects). I'm trying to give this option to the user: [code=c++] cout << "Press 'n' then Enter to show next, 'p' then Enter for previous and 'q' then enter to return to menu" << …

0
64
Member Avatar for Carrots

Hi, I have a program, which uses a vector to store some pointers. The program works fine. I'm trying to convert it to use a doubly linked list now though. At the top of the program I changed: [code] vector<Diary *>vectorname; [/code] to [code] #include <list> list<Diary *>vectorname; list<Diary*>::iterator i …

Member Avatar for StuXYZ
0
109
Member Avatar for Carrots

Hi, I would like to display an RSS feed from a website on my website, but I want to hand code a solution rather than use a widget. Basically this is a learning task I have set myself. My question is how can I load the RSS feeds into a …

Member Avatar for pritaeas
0
106
Member Avatar for Carrots

Hi, I've been learning C++ these last few months, but never tried to make a GUI before. I've wrote a program in C++ which works via the command line, but now I'm trying to create a GUI for it (MFC using Visual Studio 2005, XP host). When I add an …

Member Avatar for Carrots
0
135
Member Avatar for Carrots
Member Avatar for Carrots

Hi, I have wrote a program which stores values in a .csv file. He is the how the data is stored in the .csv file: [quote] "Steve","21 Main Street, Nottingham","SW1 1AB","0115 9123456","These are some details. and, so.","112233","1359" "David Baner","123 Shaw street, Nottingham","NG92HJ","020 123456","ifbiugbuige","112233","1200" [/quote] Each line forms a single object. …

Member Avatar for Ancient Dragon
0
153
Member Avatar for Carrots

Hi, I was wondering why the CREATE TABLE query in my code seems to be called automatically, whilst in the example below from w3schools, there is a line which explicitly calls the CREATE TABLE query. Why is that the query in the w3schools example isn't ran twice? My code: [code=php] …

Member Avatar for leviathan185
0
208
Member Avatar for Carrots

Hi, I have a question. Using the following code: [code=c++] #include <iostream> int main() { std::string s1; std::cout << s1.capacity() << std::endl; system ("PAUSE"); return 0; } [/code] In Ubuntu/KDevelop the output is 0. In Windows/V.Studio the output is 15. Can anyone suggest why it happens? I'm somewhat stumped by …

Member Avatar for Narue
0
174
Member Avatar for Carrots

I have a task to do about the std::string datatype. To do the task I need to Use KDevelop and be able to find the size of the buffer being used when performing operations upon strings, but never having used KDevelop before, I'm at a complete loss. Could anyone be …

Member Avatar for dkalita
0
192
Member Avatar for Carrots

Hi there, I was hoping for some advice on how best to solve my problem. I'm creating a .csv file to store objects in, but the datamembers which are strings, require the ability to have commas within the strings. I have found out that I therefore need to enclose the …

Member Avatar for Carrots
0
5K
Member Avatar for Carrots

Hi, I'm storing base class pointers in a vector, the pointers are pointing to objects from the derived class ( Leads ). I'm unable to access the 'getter' functions of the derived class. How can this be done? I'm trying to save the derived objects in a text file (database.txt) …

Member Avatar for Carrots
0
111
Member Avatar for Carrots

Hi, I have been building objects on the stack using the following constructor: [CODE=c++] classname node(arg1, arg2); [/CODE] Which worked fine. But have now learned it is the heap I need to use. So I need to use the [B]new[/B] command I believe, but my syntax is wrong: [CODE=c++] classname …

Member Avatar for Carrots
0
131