- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 5
- Posts with Upvotes
- 5
- Upvoting Members
- 5
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
131 Posted Topics
hello. I would like to know how I can make out a Java code from a given mathematical equation like differentiation equations, summation and integration | |
The code prompts the user for a student name and the marks then prints out the report with a letter grade..It also asks the user for the file name and stores the data in the file. | |
Re: Well you could start by this, assuming the image is in the same folder, or you can always add the path [code=java] JLabel imageLabel=new JLabel(new ImageIcon("image.*extension*")); imageLabel.setHorizontalAlignment(JLabel.CENTER); [/code] | |
I would like to know how one can make an installer, which I believe is supposed to copy needed files for an apllication to run to somewhere on the PC. I have read about how to make .jar files, and evaluted some softwares that can make installers. However, I have … | |
I have a code that calls a method, but after this call, any code after it is not executed....here is the method call skeleton [code=java] if(//some condition){ //some code myMethod(//some variables); //some code/*not executed*/ }[/code] the calling is done well but the code stays in that method i.e code following … | |
have been, for the past few weeks trying to figure out how I can compare images. From my experience in what I have been working on, I know it is almost impossible to compare two images and get a 100% match but I am not looking for a 100% match … | |
Hello. I have come across a null pointer exception in my code. I understand this is got if there is no class/method/variable being referred to but in my case, I have a method in another class that is supposed to be called. However, the exception is thrown at the where … | |
Iam using an AWT component. Did a little research but cannot find anyway I can make my player return a JComponent..tried this casting but Iam getting an exception at the line. [code=java]((com = (JComponent)p.getVisualComponent()) != null)[/code] I also got to see something about mixing SWING with AWT so I decided … | |
I have two .java files and I want to access a variable of a method in one of the files and use it in another. However, I dont want to call the whole method and I dont want the method to return a value...I'll try to illustrate below [code=java] [COLOR="Red"]//file_A.java[/COLOR] … | |
I have recently encoutered an error that I have failed to figure out while trying to implement something in MVC. I have used a similar code on another program which seems to work but I cant figure out why this one is not working. I get the error code "cannot … | |
I have written my simple query using update and in a file with a .sql extension. However, I cant seem to update my table and yet at the end of the input it shows me 1 row updated I would also want to know how I can do 2 updates … | |
I didnt know where to post this but i hope this is the right place. I was wondering how a code in c++ can be used in or with java. i.e if I decided to write a code in C++ that performs processing and i want to write another code … | |
I have got two arrays. One for initializing and another for displaying. The display array always shows nothing if the initializing array has not been called. The problem now though is that if I want to insert something in a certain slot in the array nothing happens and I dont … | |
Re: Why do people point to their wrist when asking for the time, but don't point to their crotch when they ask where the bathroom is? | |
Hey all. I would like to find out how i can access/ get the value of a variable in a different class. this is part of the code which shows what I was trying to do. [code] public class A{ protected int x; //missing code C obj = new C … | |
I was reading a tutorial about 2D arrays and I decided to construct something. I managed to construct something but when I compile I get "null" as my output. I cant seem to figure out the problem. Here is the sample code. I have also higlighted in red a line … | |
Hey all. I have another problem with classes. I have 3 classes A, B and C. B extends C and class A is where objects from B and C will be used. Below is the syntax of what am trying to say [code=cpp] class A{ private int o,p; protected B … | |
Re: a return statement must be accompanied by what a function returns. Void functions dont return values and you need to indent your code as well as using braces | |
Hey all. Iam new to java and I have been trying to do something that has played me abit. I want to use an attribute or a method from a subclass and accesing it from the super class. Something like this [code] class A{ //some code } class B extends … | |
Re: More about it here [url]http://home.att.net/~jackklein/c/inttypes.html[/url] | |
hello. Am having a hard time intepreting this java error. The last post made somethings clear but I dont know what am missing. I am getting the error "cannot find symbol construtor Student(java.lang.String, java.lang.String,char,boolean,int,int)" Iam getting the error on this line of code [code] Student studentObj1=new Student("mark","251461",'m',false,3,5);[/code] Here is the … | |
Hey all.. I have 3 classes in my program but Iam having trouble accesing a method in another class. Iam getting the error message cannot find symbol method printInfo(). Below is the code [code=cpp] class Book{ private String author; private String title; private int year; private Chapter first; private Chapter … | |
Hey all..am quite new to Java and I have encoutered a problem with my program. I am getting the error message "cannot find symbol constructor". I have tried to figure it out but I have failed. I have read around that adding an empty constructor would help but this is … | |
Re: works well in VC 2008 express edition...i think you should follow mitrmkar..suggestion or download VC 2008 express edition which is free | |
Re: The function declaration should be identical to the function definition exept that you do not need to put a semi colon after the function definition. Another easier way to do it is to put the main at the bottom of the code. Here, you do not need to declare the … | |
Re: >>don't use GetLine(), use something like scanf() Why dont you elaborate more on why he shouldnt use getline(). I believe even if he followed your advice and changed getline() to scanf() he wouldnt have a clue as to why he did it | |
Re: The few mistakes i have observed. You need to open the input file stream before actually checking for the status i.e if it exists or not. Secondly, you do not need to pass the file stream through a function. if it has already been declared in main then you just … | |
Re: Elaborating more on VernonDozier's post, your function call should only contain the paramaters and not them declared. Change your statements that look like this [code]string getWeaponSelection(int& weapChoice, int charaChoice,int weapRand,string uname, int wand, int lSaber, int magic, int magicRand[/code] To this [code] getWeaponSelection (weapChoice, charaChoice, weapRand,uname, wand, lSaber, imagic, magicRand)[/code] … | |
Re: Please use code tags and define your problem clearly | |
Re: What if you declared the bool status at the begining and if the required task is performed, the status is changed | |
Re: Manutebecker is saying you may have gotten more help from the c# forum. On the other hand, it looks like you havent tried a thing because even the simple display statements havent been changed. Why dont you try to modify it with the little knowledge you have of c# then … | |
Re: It looks like you have declared an array of 25 rows and 10 columns. I'd suggest you intialize the rows to their value(rows=25) and columns (cols=10). Try my example [code] for (i=0; i<=rows; i++) { for (j=0; j<=cols; cols++) { inData >> numbers[i][j]; cout<<fixed<<showpoint<<setprecision(1)<<numbers[i][j]<<" "; } } [/code] dont forget … | |
Re: First of all use code tags. Second do not use void main..main has to always return something. Then, what is the program supposed to do and what dont you understand about scanf..what kind of errors are you getting when you compile your code? | |
Re: Why dont you use these kinds of code tags to easily reference your problem? | |
Re: There could be a possibility that if "GetInteger" is a function it is not of integer type. Otherwise if "GetInteger" is not a function then it is not declared :) | |
Re: [QUOTE=coveredinflies;655393]Thanks guys (or girls). Didn't understand everything that was said but very helpful[/QUOTE] What didnt you understand? | |
Re: [QUOTE=sahmedsa;655392]ok so basically it means that *b=&a b=10 ?[/QUOTE] I suppose | |
Re: What kind of problem are u experiencing with setw()? Did you add the header file "iomanip"? | |
Re: [QUOTE=ff4930;631265]Basic difference is C++ is Object Oriented with classes and C is not.[/QUOTE] Not entirely though like java or c# :) | |
Re: You can add this to your code. [code] word.substr(word.find(' '); [/code] This will read until the whitespace so you can do what you want. Hope that helps | |
Re: You dont seem to show us any effort. But maybe I can give you a clue. Read in numbers and if the number is less than 0 then quit.. | |
Re: If you want to assign the values of one array to another maybe you can do something like this [code] for(int i=0;i<max;i++) { array2[i]=array1[i]; } [/code] | |
Re: cout is followed by "<<" and not ">>".. [EDIT]Check your cout in the while loop | |
Re: [QUOTE=scream2ice;634169]hi, does anyone know if there is a code in c++ that allows print on paper instead of monitor? i mean instread of using [B]'cout<<'[/B] to see what you want on monitor, use a code to print your info on paper.......cheers[/QUOTE] Perhaps output to a file then printing the file … | |
Re: It looks like you are not reading data from the file. You need to read in the data and maybe compare it to the character. Maybe something like this [code] if(getline(infile,pubcode)=='S'); { //do something } [/code] | |
Re: What kind of help do you need? It looks like you are posting your assignment questions and your not pointing out where you are finding trouble [url]http://www.daniweb.com/forums/announcement8-2.html[/url] | |
Re: You need to include<iostream> this is where the cin and cout are found. Also change void main to int main. A main function must always return a value. You need to also change [code] using namespace system[/code] to [code] using namespace std;[/code] | |
Re: well you would need two for loops for a 2D array..something like this [code] for(i=0;i<row;i++) { cin>>array[i][0]; for(j=0;j<col;j++) { cin>>array[0][j]; } } [/code] |
The End.