error: subscript requires array or pointer type
thats my code
void main(int argc, char* argv[])
{
int s[10];
int n=10;
int location;
int x;
cout<<"enter the value you want to search for: "<<endl;
cin>>x;
for(int i;i<n;i++)
s[i]=rand()%10;
binsearch(n,s,x ,location);
//return...
User Profile
Collapse
-
linking matlab code to java interface
i want to link my matlab code to work on a java interface. i dont know how.
if there is another way to do it like converting the matlab code to java, plz tell me but i guess its too difficult.
anyway im waiting for ur help, thnx :) -
bravephantom started a topic how can i choose the poistion of a component on panel?? plz be fast if u canin Javahow can i choose the poistion of a component on panel?? plz be fast if u can
i want to specify the components positions on my panel
how??
any components in general...label ,textbox or button... -
administrators, u can close this topic. im done, thnx -
first: did u mean i should use a stack so i get the operand (y) which comes immediately before the equal sign and the operand (x) that comes immediately before the operator ??
second: how can i use a textfield more than once instead of having multiple textfields??...Leave a comment:
-
using java textfields
In my project "scientific calculator", im using 2 textfields in my GUI app. the problem now (or actually what i dislike) is the user has to use the 2 textfields even if he needs a function of only 1 parameter as trig functions and roots.
when i enter 1 value in the first textfield and leave the other blank, the program doesnt give any output.
Is there any way so i can use only 1 textfield for functions which take 1 parame... -
ok man sry for that. just wanted to help.
merry christmas :)...Leave a comment:
-
thats good news.
ur welcome :)
would u mind sending me the assignment?? coz i wanna do it as a self challenge
good luckLeave a comment:
-
im still confused with what u wanna do. thats what i've guessed:
this gets u each line(question) in the txt file.
JOptionPane.sho wMessageDialog( null,s.nextLine ());
using the method nextLine instead of next() which gets a single stringLeave a comment:
-
its already workin i donno what else u need. now u can show stuff in the file in the dialog box.
its only JOptionPane.sho wMessageDialog. ... enough to do the job
u can also show each line in a new box by removing the useDelimiter() statementLeave a comment:
-
-
-
i've already made many applications and applets with java!
i only wanna no how to design the interface of the calculator.
can i add buttons to the dialog box so it looks like windows calculator? briefly how to make an editable or formatable dialog box?...Leave a comment:
-
Scientific calculator
hi first
how can i design the interface of a calculator similar to that of windows?
i'll add some functions later to work as scientific calculator.
the question now is how to implement the panel. hope u can help me with some ideas even if u feel it not so helpful it might get me closer to the true idea. -
import javax.swing.*;
import java.awt.*;
import java.awt.event. *;
import java.util.*;
public class GeographyQuiz_M enu
{
public static void main(String[] args)
{
JFrame jFrame;
jFrame = new JFrame();
JOptionPane.sho wMessageDialog( jFrame, "This is a Geography Quiz");
JOptionPane.sho wMessageDialog( null, "Good...Leave a comment:
-
how to know the IP of the connected device (im the server)
suppose a device is now connected to the network and im the server. how can i know his IP when he opens the application and sends some data and im supposed to respond accordingly. actaully its some queries sent from a user's mobile to the server.
btw im using Multi Threading application now
feel free to ask for further info so u can help me do it.
thnx for help -
plz answer fast if u can. upload images on access database
how can i save images on my database using ms access?
thnx for help -
well i meant C++
that way we now have array with 100 positions but didnt specify the length of each yet
thnx for reply...Leave a comment:
-
array of strings
how can i specify the length of strings to be put in an array??
for example if i have array[100]
i want to fill each position in the array with a string of exactly 30 spaces -
operating overloading for "<"
can i overload the operator ">" and "<" with their same names to be used for objects?
if its possible plz explain how
thnx for help
No activity results to display
Show More
Leave a comment: