64,152 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for termin8tor

Hey all, I'm attempting to use an STL List to store a list of objects. Now I realise it's quite trivial to store a list of objects of my own definition. My real question is, how do I fill the list with objects that inherit from a base class. E.g. …

Member Avatar for termin8tor
0
275
Member Avatar for JamesW315

I wrote a program that converts Celsius to Fahrenheit and vice versa. when converting Celsius to Fahrenheit I used the formula (9/5) * Celsius + 32. but that didn't work, I discovered that 9/5 was returning 1 rather than 1.8 and I'm not sure why that is. I fixed the …

Member Avatar for JamesW315
0
105
Member Avatar for AJG

Hi everyone, I'm new to Java and a relative newbie when it comes to programming in general. I've been learning a bit from some Youtube tutorials dealing with Java basics. They've been very helpful and I've been able to create a basic game setup with my new knowledge, with a …

Member Avatar for AJG
0
287
Member Avatar for techlawsam

[CODE]// This is traditionally the first program written using System; namespace HelloWorldProgram { class HelloWorld { static void Main() { Console.WriteLine("Hello World!"); } } }[/CODE] I dont get why the statements in the body end with a " ; " but nothing is placed at the end of method headings. …

Member Avatar for Momerath
1
143
Member Avatar for techlawsam

Hi I wanted to ask what is the relationship between "system" , "console" and "read" so far I found out that console is a "class" in the system name-space.

Member Avatar for techlawsam
0
195
Member Avatar for evilguyme

hey guys i got one more question :O i have this code for a class function [CODE] void Platform::set_clips(SDL_Rect platClip[], int i) { for( int j = 0; j < i; j++ ) { platClip[j].x = 0; platClip[j].y = 0; platClip[j].w = random_number_w(); platClip[j].h = 5; } } [/CODE] is …

Member Avatar for evilguyme
0
91
Member Avatar for evilguyme

Hey guys! i just started using SDL engine to make a 2d game . This is the code ive got so far, you can view it online on googledocs via this link: [URL="https://docs.google.com/document/d/1S1upv5FxT3TvZsvhaZ1nFb39aUz-AVl7MhqP8zSZ4DM/edit?hl=en_GB"]CODE[/URL] i have made bold the code that causes the problem. when i do [ICODE]apply_surface(0, 0, stick, screen, …

Member Avatar for evilguyme
0
152
Member Avatar for nuclear

So i just started learning SDL and came across "Event driven programming", just wanted to be sure if i understood the tutorial correcly. So lets say by adding: [CODE]SDL_Event event;[/CODE] i add lets say a container that keeps track of every event i do? After that i start using: [CODE]while …

Member Avatar for nuclear
0
285
Member Avatar for Jazerix

Hey there so i made this code, and i do not get why my while loop doesn't work, it checks once and then it continues to the next line, this is my code: [CODE] private void Timer1_Tick(object sender, EventArgs e) { timer++; if (timer != 65) { timerdone = false; …

Member Avatar for Jazerix
0
136
Member Avatar for dlindner999

I'm still pretty new to this and I need some help. Here's the situation. First the user opens a form to select which database (one of 3) they are working in. Then they will be using several forms. The same set of forms are always used no matter which database …

Member Avatar for dlindner999
0
282
Member Avatar for warlord902

Suppose that I have a text file and I want to insert a character in each of its line at some position. Then can I insert a character there without rewriting all the characters ahead of that position with one position ahead. Like, if I try to do that in …

Member Avatar for warlord902
0
2K
Member Avatar for sibymary

hi,im using registration form for registering users to the new account.i have 2 tables in one database.database name is test and table name is student and member.in student table which contain the register no of student which is already stored in the database.in member table,it has 4 fields which is …

Member Avatar for sibymary
0
130
Member Avatar for Sparhauoc

Hello all, first post here. I'm a newbie in php code, but declaring a simple variable I thought I could do, but apparently not. I cannot figure out which rule I broke, but I keep getting an error message in line 4 of the following code for an unexpected t …

Member Avatar for Sparhauoc
0
132
Member Avatar for anand01

Hi all, I need to access mysql db from multiple servlet i,e need to insert the value from one servlet and retrieve from another servlet.i passed the connection variables through web.xml file. i need to get those variables from both the servlets to connect the db again.how to achieve that …

Member Avatar for anand01
0
150
Member Avatar for Jamblaster

First off let me say that I am a student and do not want any answers. What I do want is some help understanding why my logic isn't working so I can devise a new plan. Any help at all would be greatly appreciated because I am completely stuck atm …

Member Avatar for Anuradha Mandal
0
213
Member Avatar for heshanm

This is my 2 tables. [B]account_details[/B] (account_number, nic, full_name, phone_number, address, gender, date_of_birth,__) [B]account[/B] (account_number, name_with_initials,account_type, fd_period,__) I want to select records in both the tables. This is my SQL line. [CODE] $query ="SELECT account_details. nic,full_name,phone_number,address,gender,date_of_birth,account.name_with_initials,account_type,fd_period". "FROM account_details,account". "WHERE account_details.account_number=account.account_number"; [/CODE] The following error occurs. You have an error in …

Member Avatar for Anuradha Mandal
0
167
Member Avatar for harryhaaren

Hey all, (Skip down till "Question:" if you're in a rush) Context: I'm coding on an audio application which involves storing buffers of audio. I'm currently using a [ICODE]std::vector<float>[/ICODE], as a member of an [ICODE]AudioBuffer[/ICODE] class. These [ICODE]AudioBuffer[/ICODE] instances are held in another class [ICODE]ResourceHolder[/ICODE]. In the "process" callback (where …

Member Avatar for harryhaaren
0
659
Member Avatar for ksm092

This is my code: [CODE] stringstream str_number string description while(!str_number.eof()) { str_number >> str_description; if (str_description.length() < 1) { break; } description = description +" "+ str_description; }[/CODE] My problem is that if the description is more than one string, the last string is repeated twice. For example if the …

Member Avatar for nuclear
0
1K
Member Avatar for ksm092

This is my code: [CODE] for (i = 0; i < date.size(); i++) { str_date << date[i]; str_date >> newDay; str_date >> newMonth; str_date >> newYear; apptDay.push_back(newDay); apptMonth.push_back(intMonth); apptYear.push_back(newYear); }[/CODE] My problem is that the first date[1] gets saved nicely, however the second round of the loop it all goes …

Member Avatar for ksm092
0
112
Member Avatar for musicmaker001

I created a Javascript application that creates a moving quote.([url]http://economymoving.net/get_an_online_moving_quote.php[/url]) The quote page should insert a record in the db, display the record on a new page called viewquote.php and send an alert email to the company. Currently, the phpmyadmin database receives the record but viewquote.php doesn't display the correct …

Member Avatar for paulrajj
0
987
Member Avatar for silvercats
Member Avatar for tapuwa2002

Hey guys I was hoping you help, I have a ms access database on my webserver. I want to select all the records with a certain date. But it seems not to work. [CODE] <CFQUERY NAME="qStuff" DATASOURCE="MyDb" maxrows="20"> SELECT * FROM Stuff; WHERE (((Stuff.RegDate)=#5/1/2004#)); </CFQUERY> [/CODE] When I do this …

Member Avatar for tapuwa2002
0
221
Member Avatar for clyo cleopas

[CODE] //A c++ program that calculate and print parking charges #include <iostream> using namespace std; #include <iomanip> const double minimumFee = 7.00; const double hourlyFee = 1.75; const int numOfCustomers = 12; const int numOfMinsPerHour = 60; void inputAndValidate(int&,int&,int&,int&); void convertToMinutes(int&,int&,int&,int&); void convertBackToTime(int&,int&,int&); double calcCharge(int,int); int entranceMinutes,exitMinutes,entranceTimeInMins,exitTimeInMins ; int minutesParked,parkedMinutes,entranceHour,exitHour,parkedTime …

Member Avatar for raptr_dflo
0
1K
Member Avatar for aldeene

i'm using this code [CODE] If txtCashTendered.Text = "" Then MsgBox("Input Amount First!") txtCashTendered.Focus() Exit Sub End If If ctbTotal.Text < txtCashTendered.Text Then Try Dim x x = MsgBox("Finalize Transaction?", MsgBoxStyle.YesNo) If x = vbYes Then txtCashChange.Text = Format(txtCashTendered.Text - ctbTotal.Text, ".00") FinalizeTransaction() End If Catch ex As Exception MsgBox("Create …

Member Avatar for aldeene
0
93
Member Avatar for end3r

Hi, I have a select statement and I need to find a way to apply a filter to it: [CODE] select * from my_table where my_table.field_1 like :filter_item [/CODE] The real problem is that filter_item can be a string, a string that includes '%' or a comma-separated string that can …

Member Avatar for end3r
0
210
Member Avatar for mikejs

Hi I have set pane1.hide() and panel2.hide on form load however the panel still shows when I had only one panel it worked fine the new panel is exactly the same size placed directly over the other. Why does it still show? I know I could use multiple forms it …

Member Avatar for mikejs
0
78
Member Avatar for Hani1991

Hello everyone, I've read, in the manual of PHP, about this function, i.e. quotemeta(string $str). This function [QUOTE]Returns a version of str with a backslash character (\) before every character that is among these: . \ + * ? [ ^ ] ( $ )[/QUOTE] Now, I understand what it …

Member Avatar for Hani1991
0
129
Member Avatar for staticwave

Hi, I am very new to working with php and I need a little help getting the fields from my form divided into two rows and properly aligned when output to the user. [B]Function:[/B] This is a Client Profile type of program. A form is displayed to the user and …

Member Avatar for staticwave
0
413
Member Avatar for jovillanuev

Hi Guys, How do i obtain the nearest shipdate prior to Returndate. here is my sample script. thanks. kindly check my script. the result should be 2011-02-23 [CODE] Table1 ESN--DateReturn 123--2011-03-08 TABLE2 ESN---ShipDate 123---2010-09-28 123---2011-02-23 Select a.DateReturn max(b.shipdate) from Table1 as a left outer join table2 as b on a.esn=b.esn …

Member Avatar for jovillanuev
0
98
Member Avatar for Hani1991

Hello everyone, I've visited a lot of websites, like Daniweb, and found effects on the sites pages that are really of a considerable design. I know it's becoming common, but I really get impressed at seeing such things. When you put the mouse cursor on some button it becomes highlighted …

Member Avatar for Hani1991
0
157
Member Avatar for Oneryavuz

i have a control dll and i use this control in my project then i change this controls codes after i do it . appears some error on this lines in form1[designer] [ICODE] Me.Dentisyon1 = New WindowsControlLibrary1.dentisyon Friend WithEvents Dentisyon1 As WindowsControlLibrary1.dentisyon [/ICODE] what should i do? thx for answers

Member Avatar for Oneryavuz
0
111
Member Avatar for king03

Help please I am trying to output a value of an array, for example I want to output 7. How do I do it? Here's the code: [CODE]{ class Program { public static void Main(string[] args) { double [] kush = new double [2] {5.2,7}; Console.WriteLine(kush[2]); Console.ReadKey(true); } } }[/CODE] …

Member Avatar for king03
0
93
Member Avatar for Oneryavuz

i for example i save ppt in OLEDB OLE Object :-/ and i need to open this powerpoint file in my program how can i do that :| thx for answers :|

Member Avatar for Oneryavuz
0
139
Member Avatar for Oneryavuz

i have a table and oleobj column in this table. i save some files to oleobj. and i need to open them how i can do that. for example i save ppt in oleobj and ineed to open this powerpoint file how can i do .. 2nd question. can i …

Member Avatar for Oneryavuz
0
477
Member Avatar for jimmylee7706

I'm trying to make a simple text game just for fun. Java is a language I want to learn so making a game is a great start. I'm having problem with my if statement however. This is an example of whats happening. This is only a few hours into the …

Member Avatar for jimmylee7706
0
235
Member Avatar for JoshuaBurleson

I'm trying to understand utilizing classes and their methods. I made a simple program to exit or print 'Will continue' given a word. however I keep getting a TypeError for self and through reading my books and searching online I'm still not quite sure why. the code is: [CODE]class OffSwitch(object): …

Member Avatar for Enalicho
0
242
Member Avatar for mikejs

Hi I have managed to sort out my date issue however although I have used the same code format on of my tables is not being updated and I am not getting any error msg so not sure why it will not work this is my code [CODE] cmd1 = …

Member Avatar for adam_k
-1
133
Member Avatar for Walahh

Hello, May be the there is a very simple solution for my problem, but I am stuck on this for 2 days already. May be I had been looking at the wrong places...I would really appreciate any kinds of helps....feeling really frustrated right now. You see, for my project at …

Member Avatar for adam_k
0
270
Member Avatar for CaptainHook

I have written some code to count the number of upper case letters in a string and the last line will not work? I am trying to print a statement that concatenates a line of text and an integer variable: [CODE]print ("The number of upper case letters are: " + …

Member Avatar for CaptainHook
0
240
Member Avatar for CaptainHook

I am trying to write code to count the number of upper case letters in a string using Python. I have written the following but instead of the code returning the number of Upper Case letters it returns []? An help would be gratefully recieved. [CODE]import re while True: strPassword …

Member Avatar for CaptainHook
0
305
Member Avatar for nuclear

Its something really basic, but for some reason i cant get my dinamic array to work. Keep getting a message that i need to add the "[]", but then i would create a static array, not a dinamic one. The code: [CODE]program Noname0; var arr : array of integer; begin …

Member Avatar for Duoas
0
127
Member Avatar for kayoh

[CODE]Dim Processors(4) As ProcessorType For j = 1 To 4 Step 1 Put #filenum, WritePos, Processors(j).byte0 WritePos = WritePos + 1[/CODE] I'm in the process of translating this VBA code to python, and essentially what it does is creates 4 Processor Objects but as you can see from the for …

Member Avatar for kayoh
0
288
Member Avatar for bettybarnes

What is the c++ code of this c language code [CODE]printf("%d", b[i])[/CODE] ??

Member Avatar for bettybarnes
0
101
Member Avatar for iampord

Is anybody know what is the easiest way to encrypt and decrypt text from textbox? Thank you in advance. Good day!

Member Avatar for Reverend Jim
0
2K
Member Avatar for djjavo

For my user system, I require each user to have a unique id. The reading in and saving of the user data is all done, but now I'm focusing on adding new users. In my add user dialog, I have the information fields required to create a new user, one …

Member Avatar for djjavo
0
190
Member Avatar for ksm092

I am trying to sort a vector of strings in order (one line consists of various strings e.g. 12 10 2010) and was wondering if I would be able to extract individual values from one line of a vector? The way I am doing this is by reading lines from …

Member Avatar for jinhao
0
182
Member Avatar for Cross213

I would like to know how the isFull() function works for a Stack and a Queue, but by implementing the Stack as a dynamic array(without a predefined size) and implementing the Queue as a linked list.

Member Avatar for Cross213
0
1K
Member Avatar for djjavo

Hi, I'm coding my program on VB.net and I take my laptop when I am away and use my PC back at home. I know this may sound simple, but what is the easiest way to get the project on another PC. For example, in Java I know that you …

Member Avatar for djjavo
0
223
Member Avatar for Eagletalon

Hi there everyone, I really hope someone can help me, I am working with Visual C++ with QT libraries and using... well... something that represents MVC (long story)... now I need to pass a const QString& from my 1 controller class to the model of another class... When doing so …

0
78
Member Avatar for Hendo

*sigh* Okay, I'm building a small console app to launch batch files. I have user inputs for selecting the drive letter, and the folder path. The batch files have the same name as the drive letter (i.e. d.bat, e.bat, etc.). [CODE]drvPath = (drive + ":\\" + fpath + "\\" + …

Member Avatar for Hendo
0
188

The End.