Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
73% Quality Score
Upvotes Received
4
Posts with Upvotes
3
Upvoting Members
2
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
0 Endorsements
~4K People Reached
Favorite Tags
c++ x 53
java x 13
c x 3
jsp x 2
Member Avatar for StaticX

Hi, I have a program that has a package that is imported in a class called Control.All the files are compiling correctly apart from when I try to import a package. I am importing the package by [CODE]package carpkg;[/CODE] and in my main there is [CODE]GUI gui = new GUI[/CODE] …

Member Avatar for Gerbiler
0
148
Member Avatar for StaticX

Hello, I am having some trouble with getting my menu to respond to a mouse click.I have 2 items on my menu, "New" and "Exit", and they are using the actionlistner like so [CODE] newFromMenu = new JMenuItem("New Screen"); newFromMenu.addActionListener(this); [/CODE] and then my action event [CODE] public void actionPerformed(ActionEvent …

Member Avatar for StaticX
0
65
Member Avatar for StaticX

Hi, I am having a terrible time getting to grips with layout managers, and am hoping someone can shed some light onto my misery.My problem is this: I have created a simple GUI, that contains a button panel, a picture panel and a radio button panel.All these panels are put …

Member Avatar for hanvyj
0
144
Member Avatar for StaticX

Hello, I have created a simple frame, and in it there are 3 panels.I have a button in the bottom panel, and when pressed should display the text "You pressed the button", in the mainPanel.However this is not working.Can anyone shed some light as to what I am doing wrong …

Member Avatar for kramerd
0
122
Member Avatar for StaticX

Hi everyone, I am having a little(lot of..) trouble figuring out how to combine a GUI I have made and the code that goes with it. I am vaugley familiar with action listener process, and I understand this is how to give functionality to buttons etc. However, the part I …

Member Avatar for StaticX
0
155
Member Avatar for StaticX

Hello DaniWeb, Basically like the title suggests I am having trouble generating a random element from my array, and storing it in another array. I am quite new to Java, and the api is a little confusing but from what I can see there is no method for this. Searching …

Member Avatar for Eric Cute
0
178
Member Avatar for StaticX

Hi, Like the title says I am having a little difficulty connecting a JSP page to database.Here is my code containing the setDataSource, I am pretty sure that this is whats causing the problem. [CODE] <%@ taglib prefix="sql" uri="htpp:/java.sn.com/jsp/jstl/sql" %> <sql:setDataSource var = "labdb" scope = "session" driver = "sun.jdbc.odbc.JdbcOdbcDriver" …

Member Avatar for peter_budo
0
166
Member Avatar for StaticX

Here is a smaller program I made but the concept is much the same, what I understand( which is obviously not the case ) with this program is: The function returnFunc is called 3 times in main Each time is is called it returns a value from the array Is …

Member Avatar for StaticX
0
80
Member Avatar for StaticX

Hi all, im wondering if someone could offer a solution to my current problem which is passing and return information using pointer notation. I have created a small program using the class Person, who has a first and last name and methods to add and retrieve this information which looks …

Member Avatar for Jiwe
0
97
Member Avatar for StaticX

Hi, Can anyone help me with this problem.For example i have a text file called food.txt with contents 1 apples 2 oranges 3 mango 4 bananna What i would like to do is enter the choice of fruit into a string and loop through the file until the word is …

Member Avatar for Lerner
0
108
Member Avatar for StaticX

Hi, Im wondering if someone could clarify a problem im having. Basically im trying to figure out how i can go about having a Class A object as an attribute of Class B,while still using Class A's functions. For example if have a class called clockRadio.In turn i have another …

Member Avatar for StaticX
0
100
Member Avatar for StaticX

Hi i am wondering if its possible to do the following,say i have 2 integer pointers containing numbers,and i want to add them together to a third integer pointer,is this possible?

Member Avatar for necrolin
0
98
Member Avatar for StaticX

Hi Im having a problem when it comes to dynamic memory allocation.I have a program that lets me pick the size of my array,and then input numbers into it. That all works well,it is when I try to add another int to this array that im having problems with,could anyone …

Member Avatar for StaticX
0
325
Member Avatar for StaticX

Hi, I am currently running on windows and have and issue when i try to read/write files,the problem being that it just doesn't happen. I know the code is correct because when I use a linux os and other windoze machines everything is ok..it just seems to be my computer. …

Member Avatar for StaticX
0
107
Member Avatar for StaticX

Hi i have a question about inputting to char*. For instance,i have made a class "Name",and am passing my constructors in as follows [CODE] Name* n1 = new Name("Nelly the elephant"); [/CODE] [CODE]Name::Name(char* name){ this->name = name; }[/CODE] But i am confused as to how i would code my addName().Ideally …

Member Avatar for StaticX
0
162
Member Avatar for StaticX

Hi, i am making a program that contains an integer array of an unknown size.The user is prompted to enter numbers into the array,and press 'x' to exit. What i am going to do then,is to pass the array from the main into a class which contains another array,but before …

Member Avatar for VernonDozier
2
123
Member Avatar for StaticX

<thread split from [URL="http://www.daniweb.com/forums/thread172315.html"]here[/URL]> Could i have an elaboration on this explanation please? My poblem being that i have wrote 2 objects to a binary file called "data.dat" No problem there. But then i have a function that needs to find the number of objects in the file.I can do …

Member Avatar for Ancient Dragon
0
86
Member Avatar for StaticX

I am trying to make a small program which will write to a binary file,this is my code: [CODE]// program that writes to a binary file #include <iostream> #include <fstream> using namespace std; main() { fstream* bfile = new fstream("file.bin", fstream::out | fstream::binary | fstream::ate); int a = 2; int …

Member Avatar for Nickg140143
1
233
Member Avatar for StaticX

Hi,im having trouble with fstreams at the moment,here is my code [CODE]// read contents of file using fstream // using the ->get() function. // Ascii files only. #include <iostream> #include <fstream> using namespace std; main(){ fstream* file = new fstream( "myfile.txt", fstream::in); char aSingleCharacter; //this will read a single char …

Member Avatar for Ancient Dragon
0
117
Member Avatar for StaticX

Hi i am in need of an explanation to the following: I have created a program to take in a string(stored in a character array). With my string,i must pass it into a function and 2 functions i have created are stringLength and toUpperCase.(i know there are string functions to …

Member Avatar for StaticX
0
96
Member Avatar for StaticX

Hi, I have made a small program to check if character arrays are the same(similar to string compare).This is my code so far: [CODE] // string Compare () #include <iostream> using namespace std; main(){ char a[10] = {'a','b','c','d','e','f','g','h','i','j'}; char b[10] = {'a','b','c','d','e','f','g','h','i','j'}; for(int i = 0; i < 10; i++) …

Member Avatar for Dave Sinkula
0
106
Member Avatar for StaticX

Cant seem to find the solution to this although its probably starting me straight in the face. Iv been at this for a few days now,can anyone help me spot the bug? [CODE]// test the bool #include <iostream> using namespace std; main(){ int turn; int var=2; while(var!=1){ cout << "1 …

Member Avatar for snehil_khanor
0
96
Member Avatar for StaticX

HI, Today im tying to build a game program,im not really stuck on the coding aspect but its the concept of the 2 players in the game that is confusing me. For a starters, the game has 2 players.Player one goes first,after their go its player twos turn and so …

Member Avatar for StaticX
0
79
Member Avatar for th3learner

[code=c] #include<iostream.h> #include<conio.h> #include<stdio.h> #include<string.h> void main() { char s[100],z[10]; clrscr(); cout<<"Enter your name:"; gets(s); cout<<strupr(s[0]); cout<<"."; getch(); } [/code] what I am looking for is that when user input deniweb,then it should output [B]D[/B] please help Thanks

Member Avatar for Sky Diploma
0
151
Member Avatar for StaticX

Hi,Im having a hard time understanding the fundamentals of Object oriented programming.Ive made a really simple program that allows a user to enter a number, and then i have a function that doubles this number and returns it. But im still having the same errors that i had when i …

Member Avatar for mikiurban
0
105
Member Avatar for StaticX

Hi, I am trying to write a simple program that stores a user input in a c-string,and will then print out each character (I)diaganolly across screen and (II) each character on a new line. The problem im having with this,and with c strings entirely,is that it keeps printing out random …

Member Avatar for StaticX
0
108
Member Avatar for StaticX

Hi, Im having a bit of trouble with a problem: Basically, I have an array with a set size,for example [CODE]my_array[40][/CODE] I am trying to figure out how to tell if it has less than 20 characters filled,and if it has more than 20 characters filled. I have tried the …

Member Avatar for Tom Gunn
0
118
Member Avatar for StaticX

Hi ,im having a problem with my do while loop,basically I want it to loop so long as the users attempt is less than 10. However,it just doesnt want to seem to let me do this.Ive tried putting the "attempts++" several places through the loop as i thought this might …

Member Avatar for bennie22
0
142