43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for RichardCrickets

Hello daniweb, I am new to Java and to this forum! I am trying to put some objects into an array like this.. [code] MovingPlatform[] platforms; platforms = new MovingPlatform[1]; [/code] The problem is that I want to be able to access variables of objects within my array. I have …

Software Development java
Member Avatar for RichardCrickets
0
103
Member Avatar for HITMANOF44th

i am new to c++ so please dont throw any crazy words around :D im using dev C++ form bloodshed as my editor / compiler what i am trying to do is when a user hits one of the special buttons all keyboard input after that will be reformated depending …

Software Development c++
Member Avatar for HITMANOF44th
0
114
Member Avatar for vnproduktionz

[code] Program to make snowflake! # Local graphics module. Must be in same folder as this # program (or both on Desktop) import ecs10graphics as gr # Math module that comes with Python import math def pointOnCircle(f, r): # f is fraction of the way around # r is radius …

Software Development python
Member Avatar for vegaseat
0
94
Member Avatar for yasser87

Hi guys and girls I am writing a program to solve a linear system equations using gaussian elimination method by taking the factors and storing them in a NxN+1 matrix, this matrix can take integer numbers as well as floating point numbers i need help in translating this program to …

Software Development assembly
Member Avatar for Nick Evan
0
158
Member Avatar for gehring

Hi, I am using VC++ 6.0. When i clear a vector using vector.clear() the capacity is not being reduced to zero. Hence the memory is not being deallocated. I have tried to reduce the reserved size by use of vector.clear() followed by vector.reserve(0). This however has no effect. I have …

Software Development c++
Member Avatar for gehring
0
331
Member Avatar for Alicito

in this program im tryin to keep the guests in a line and the numbers in another line ... but it always start from the middle of the list I dont know why take a look : [CODE]class Program { static void Main(string[] args) { string x = "Guest_TheDreamBoi Guest_XxEmoChickGirlxX …

Software Development
Member Avatar for Alicito
0
172
Member Avatar for gehring

Hi All, I am trying to create a 2D array of the [B]"CString" MFC class,[/B] however it needs to be declared dynamically for my application. I have read up on numerous forums but I just cant seem to find what I am looking for. From what I have read the …

Software Development c++
Member Avatar for Narue
0
819
Member Avatar for shine_jose

To add check box to grid who s auto generate column property is true. I wish to select all the rows who s check box is checked .which can be checked by the user after generating the grid so at generating time all item template check box default values want …

Software Development
Member Avatar for chandru7
0
136
Member Avatar for NicholasE

Dear All, I am opening a file called initialisation: [CODE]try: initFile = open("initialisation.dat", "r") except IOError: print ("Initialisation file cannot be openned for reading")[/CODE] I would like to read the contents of this file and then print them on several other files i.e. file1, file2, file3, file4, etc. i am …

Software Development python
Member Avatar for Gribouillis
0
123
Member Avatar for P00dle

Hi all, I've been google'ing my backside off in search of a good example/tutorial for java gui's. Could anyone supply me with a link to a website that could supply a tutorial and/or some examples? Would be great, thanks. P.S. I use Eclipse, with no GUI editors, so I need …

Software Development gui java
Member Avatar for jbennet
0
379
Member Avatar for murid

I have a button, if I press the button, new picturebox will appear in my main form. How to add picturebox name in the listbox ? how to select picturebox name from a listbox for deleting the selected picturebox? thanks...

Software Development vb.net
Member Avatar for GeekByChoiCe
0
108
Member Avatar for leroi green

hey all, I'm using a form to throw info straight into a database. i know it isn't the best way but i'm new and all other implementations have confused me (i've been reading and watching tutorials for 2 weeks) but anyway i'm going to take the info straight from the …

Software Development open-source vb.net
Member Avatar for leroi green
0
120
Member Avatar for bhas_purk

hi, how do I create an array of pointers to a struct using malloc? using malloc like this- [CODE=c] abc * a = (* abc)malloc(sizeof(abc)*10); [/CODE] I get an array of struct objects. I can access member elements using the "." operator. eg a[2].xxxx what I want is an array …

Software Development c++
Member Avatar for bhas_purk
0
146
Member Avatar for Viralguardian

Hello! I have this homework problem, that I thought I had figured out, but once I fixed all the syntax errors and debugged it again it gave me some weird numbers...something I totally didn't expect. Can anyone give me a clue as to where I went wrong? I suspect that …

Software Development c++
Member Avatar for Viralguardian
0
206
Member Avatar for lotrsimp12345

the delete must be by copying the data and then deleting if their are 2 nodes from that one root. CODE IS AT VERY END FOR THAT. CALLED REMOVE. Thanks. main [CODE] #include <iostream> #include "my_bst.h" using namespace std; int main() { my_bst<int,int> ab; ab.insert(4,1); ab.insert(2,2); ab.insert(6,3); ab.insert(1,4); ab.insert(3,5); ab.insert(5,6); …

Software Development c++
Member Avatar for lotrsimp12345
0
85
Member Avatar for dark1806

hi..pls help me with this ...when i run this c program i get in result segmentation fault message (i run in ubuntu terminal): [CODE=c]#include<stdio.h> #include<utmp.h> int main() { char *s,*c; struct utmp *u; int i; c=getlogin(); setutent(); u=getutent(); while(u!=NULL) { if(u->ut_type==7 && strcmp(u->ut_user,c)==0) { printf("%-12s",u->ut_user); printf("%-9s",u->ut_line); s=ctime(&u->ut_time); for(i=4;i<16;i++) printf("%c",s[i]); printf("(%s",u->ut_host); …

Software Development c ubuntu
Member Avatar for dark1806
0
133
Member Avatar for noey699

I am trying to create a timer that calls a function when the timer ends this is the timer class [code] class CreateTimer{ float OverallLapsed; float EndOfTimer; bool Running; public: CreateTimer::CreateTimer(float); void StartTimer(); void StopTimer(); void Lapsed(float); void SetEndOfTimer(float); bool CheckTimer(); void ResetOverallLapsed(); float GetOverallLapsed(); }; CreateTimer::CreateTimer(float EndTime){ EndOfTimer = …

Software Development c++
Member Avatar for noey699
0
96
Member Avatar for hit25

So here is the problem. I have a file that starts with a number, this number says how many entries are in the file (5 means there are 5 names). Each entry takes up two lines in the txt file. First line is the name, the second is a group …

Software Development c++ data-science
Member Avatar for hit25
0
246
Member Avatar for Geek_Cyborg

Hello, I want to store all ListView items of index (2) in a MultiLine TextBox, Please explain how can i transfer all listed text of specific index

Software Development listview visual-basic
Member Avatar for vb5prgrmr
0
92
Member Avatar for gangster88

i am a bit stuck on this, i need to call the first 2 functions for the output in the 3rd one. The user has to should be able to continue until they want to stop converting and they should be asked on which way the conversion is to be …

Software Development python
Member Avatar for sneekula
0
597
Member Avatar for Bladtman242

Hi, i just don't get why this isn't working. It is supposed to read from the end of a .txt and up, until it hits the first space but it just keeps repeating the last character in the text file ip.txt Any help is much appreciated. [code=c++]#include <iostream> #include <fstream> …

Software Development c++ ios
Member Avatar for Bladtman242
0
631
Member Avatar for Musafir

[CODE]def main1(f): return (f - 32) * 5.0 / 9.0 def main2(c): return 9.0 / 5.0 * c + 32[/CODE] the two function above convert fahrenheit and celsius I have to write a third function which calls the two functions above and allows the user to input to convert between …

Software Development python
Member Avatar for sneekula
0
393
Member Avatar for Tech B

I want to read two points in a picture. Most pixel values will be (0,0,0). I don't know how to take the flatted data and separate it into x,y coordinates. I use the Image library and VideoCaputre.

Software Development python
Member Avatar for fallopiano
0
527
Member Avatar for Darth Vader

I have two processes where the First process sometimes is writing to a file and the second process is reading this file. For the second process I wonder if it is possible to only read the file if the First process does not use the file. How would it be …

Software Development c++ file-system
Member Avatar for Darth Vader
0
147
Member Avatar for marcux

Hi all! I want to make a subclass of dict and I have read about subclassing and the super method. The problem that I do not get is how I override the following method: [CODE]dict[key] = value[/CODE] This creates a new key with the specified value. I want to override …

Software Development python
Member Avatar for Gribouillis
0
195
Member Avatar for sneekula

I was trying to create a 3x3 list of lists, and came up with this surprising behaviour: [code]# creating a 2D list with an overloaded * operator mlist3 = [[0]*3]*3 print mlist3 # [[0, 0, 0], [0, 0, 0], [0, 0, 0]] mlist3[0][0] = 1 print mlist3 # [[1, 0, …

Software Development python
Member Avatar for Mathhax0r
0
1K
Member Avatar for Musafir

i have to write a program that simulates the flipping of a coin. 1. the function should ask the user how many times the coin should be flipped 2. the program should display the poportion of times that the head and tails appeared. (for example if the user enters 10 …

Software Development python
Member Avatar for vegaseat
0
141
Member Avatar for SoulMazer

Okay, so I am writing a media player and I would like to be able to control the entire thing without the use of a GUI. So...are there any libraries or anything that would allow me to collect keystrokes on any OS (not just Windows)? Thanks in advance.

Software Development gui python
Member Avatar for Tech B
0
235
Member Avatar for Valaraukar

Hi, I'm trying to update an objects information within my linked list but for some reason after attempting to alter the data no changes appear to have taken place. As far as I am aware I'm not updating a copy of the object because I am finding the relevant object …

Software Development c++ linked-list
Member Avatar for Valaraukar
0
183
Member Avatar for samsons17

Hi.. I'm writing a code for the cash receipt program.... before this,i already make this kind of program.. but the program that i've made before is simply doing this task only : [B] //ask the user to enter the product information... Enter the product id : Enter the product name …

Software Development c++
Member Avatar for samsons17
0
100
Member Avatar for Dorayaki

Hi Can anyone please check my code ? I'm trying to get today's date from database I tried many ways and I'm stuck now.. at my database access the transdate appears like this [CODE]11/29/2009 2:02:23 AM[/CODE] and this is my query code from VB.NET [CODE]"SELECT TransDate, Deposit, Withdrawal, TotalAmount FROM …

Software Development vb.net
Member Avatar for Dorayaki
0
263
Member Avatar for hajiakhundov

Hello Everyone. I am creating this Windows Forms Application using Visual Studio. Basically, in order to do what I want to do, I need to use an integer, and that integer needs to be converted into a string in order to change the label text, when pushing the button. However, …

Software Development c++ visual-studio
Member Avatar for hajiakhundov
0
2K
Member Avatar for Sky Diploma

Hey Everyone, I have written this Matrix Multiplication program. But The Program seems to crash when during the filling of the first matrix, exactly after the completion of the first row. Here is my implementation [code] #include <iostream> using namespace std; void generate (int ** ,int ,int); void fill (int …

Software Development c++ matrix-multiplication
Member Avatar for Sky Diploma
0
155
Member Avatar for fjrivash

Hi *, I have some doubts about passing parameters to a method of a class. I am not sure if it is a problem of my design of the app or a problem of the implementation, I mean C++ knowledge. I have a class called MatrixHandler : The idea is …

Software Development c++
Member Avatar for fjrivash
0
131
Member Avatar for JimD C++ Newb

Good evening, everyone! I'm currently writing a game for a class, and I'm attempting to add a few extra features that aren't required. The one that is giving me difficulty is the high scores. I am saving the score and the name as a string. When a game ends, it …

Software Development java
Member Avatar for JimD C++ Newb
0
132
Member Avatar for gehring

Hi All, I am extremely new to C++ and would greatly appreciate any advice regarding the following question: I am trying to create a 2D array of CStrings, however it needs to be declared dynamically for my application. I have read up on numerous forums but I just cant seem …

Software Development c++
Member Avatar for Clinton Portis
0
836
Member Avatar for J0kerman

So i want to define a variable with the index of a current step, and then print that variable. For example I have a loop with 10 steps, and i want to define 10 variable: x1, x2, x3....x10 and then print them out: x1=something, x2=something, ......, x10=something.Does anyone know how …

Software Development python
Member Avatar for J0kerman
0
23K
Member Avatar for sathya8819

Hi, I have a problem. I have this image with various regions detected and coloured differntly. What I now need to do is, to find the mathematical center of each of these regions. I have the code for this. [CODE] int labelnew = 2,centerx,centery; List<Point> l = new List<Point>(); Point …

Software Development
Member Avatar for sathya8819
0
73
Member Avatar for Behi Jon

Hi, What is the problem of this program ? It should print intertech systems, but it doesn't do . This program must convert all letters of the string to lowercase character . [code] Page 60 , 132 TITLE A08CASE (COM) Change uppercase to lowercase .MODEL SMALL .CODE ORG 100H BEGIN: …

Software Development assembly
Member Avatar for Behi Jon
0
212
Member Avatar for maliknouman

Hi please help me in this code, it gives always error on execution of command is comes. [code=vb.net] Try DBconnect() cmd.CommandText = "Designation_INSERT" cmd.Connection = con cmd.CommandType = CommandType.StoredProcedure 'Fill the Parameters of Store Procedure Param = cmd.Parameters.AddWithValue("@DesignationID", TxtDesigCode.Text) Param = cmd.Parameters.AddWithValue("@DesignationName", TxtDesigName.Text) Param = cmd.Parameters.AddWithValue("@ApprovedBy", TxtDesigApproved.Text) cmd.ExecuteNonQuery() 'Error Comes …

Software Development vb.net
Member Avatar for maliknouman
0
256
Member Avatar for Kennych

Essentially what I'm trying do with nested statements is that when I enter the the second switch stament and when I exit the second switch statement it goes back to the first switch statement menu. Currently the current code exits the entire program after the second switch exits, which of …

Software Development c++
Member Avatar for jonsca
0
856
Member Avatar for rzhaley

hi im trying to create a C# program that'll display * ** *** **** *** ** * type pattern but i can only get mine to look like this when i try to add on to the code * ** *** **** and then it stops. can anyone help on …

Software Development programming-construct
Member Avatar for Geekitygeek
0
149
Member Avatar for phatJacob07

First of all, I'd like to say hello to the Daniweb community as a first-time poster. I'm sorry if this is a common error for you folks to deal with, but my preliminary search of the forum didn't really help me all that much. So here we are. Onwards to …

Software Development vb.net visual-basic
Member Avatar for phatJacob07
0
111
Member Avatar for samoo

hi everyone i have a problem in my project that i have made pleaze help!!!!! this project allows the user to read words and their meanings from file and store them in AVL tree and then print the tree inorder, postorder, and preorder then print the result to file in …

Software Development java
Member Avatar for javaAddict
0
1K
Member Avatar for muffinhead

I'm writing a program that is supposed to be able to bubble sort data by name and by average. The data I'm given is student last name followed by 3 scores, all put into a text document. I'm to read the names and scores into their respective parallel arrays, and …

Software Development c++ ios
Member Avatar for Ancient Dragon
2
121
Member Avatar for nccsbim071

Hi I have a windows application that prints a record in a given page size. I looked all over but i could not see how did it set the page size. and now requirement is to print the paper size in legal paper size of 18.5" by 14". How can …

Software Development legal
Member Avatar for nccsbim071
0
149
Member Avatar for ticktock

Hey so this is an assignment and what we have to do is: [quote] Design a class that can be used to represent types of food. A type of food is classified as basic or prepared. Basic foods are further classified as Dairy, Meat, Fruit, Vegetable, or Grain. The services …

Software Development c++
Member Avatar for ticktock
0
142
Member Avatar for novicevbp

Hi I am trying to open a MS Access db via CommonDialog1. All is fine untill I click OPEN after selecting the db I want. What I then get is a dialog for ODBC entitled SELECT DATA SOURCE with two tabs: File Data Source or Machine Data Source. If I …

Member Avatar for vb5prgrmr
0
111
Member Avatar for Duncans Ghola

These function calls are not compiling for some reason, I receive the following error message when I attempt to compile. [QUOTE]hw11.cpp: In function âint main()â: hw11.cpp:70: error: expected primary-expression before â]â token hw11.cpp:71: error: expected primary-expression before â]â token hw11.cpp:71: error: expected primary-expression before â]â token hw11.cpp:72: error: expected primary-expression …

Software Development c++
Member Avatar for Duncans Ghola
0
214
Member Avatar for gangster88

how could i double a number when clicked on in the graphics window?... this is for graphics.py and a line separating the two sides in the graphics window and on each click on either side it must go up by 2 until 12? i can only think of using a …

Software Development python
Member Avatar for jaison2
0
155

The End.