zeroliken 79 Nearly a Posting Virtuoso

So a class is just like a struct???????

Nope, there's a visible difference between a structure and a class
structs have default public members and bases and classes have default private members and bases.

Read some articles regarding classes and structures

zeroliken 79 Nearly a Posting Virtuoso

i'm use Netbeans
i create JframForm and add a panel to it ,and create new jpanel and add components to it like buttons & textboxs ,finally I'm add the panel 2 to panel 1 but the components of panel 2 not appear and their is no errors.
"how i add the 2nd panel and their components to the 1st one ?"

Without posting your code it's hard to guess how your program should work

zeroliken 79 Nearly a Posting Virtuoso

i want the last string output to look like this: abc def instead of abc_def..please help

How about using strtok and set "_" as a delimeter

zeroliken 79 Nearly a Posting Virtuoso

My point in generating numbers are like there shouldn't be have a same number in generating it

You can use an if statement or a loop to check if the number has already been used

number1= 1+generator.nextInt(9);
            number2= 1+generator.nextInt(9);
            while(number2==number1){ //simple sample only
            number2= 1+generator.nextInt(9); //assign another value
            }

note: there are a lot of ways to achieving this try experimenting on your own ;)

But how? I already try to use the random generator but still it gets the save number.

I'm not sure what you mean here can you be a bit more specific at what part of the code?

zeroliken 79 Nearly a Posting Virtuoso

Use the Random() to generate numbers from 1 to 9 then check if the number has already been used

zeroliken 79 Nearly a Posting Virtuoso

Did you download the source code and check(view/edit/test) the contents to see how it works?

zeroliken 79 Nearly a Posting Virtuoso

i have the solution but i dont understand it... thats worse...

You can always post the whole code if you need additional help
or you can study it by yourself :)

zeroliken 79 Nearly a Posting Virtuoso

The more we move forward...
...the more it gets complicated

zeroliken 79 Nearly a Posting Virtuoso

the second break stops the current loop it's in so it should return to the first loop

"Why not try it yourself to see what happens, you can use print statements to see where the program is heading"

zeroliken 79 Nearly a Posting Virtuoso

print all the values of the array so you can see what happened

zeroliken 79 Nearly a Posting Virtuoso

//Can I use new keyword with the abstract class?

no you can't create an instance of them.Instead, you have to subclass them and create an instance of your subclass.

Kinda like what you did

zeroliken 79 Nearly a Posting Virtuoso

declare the classes as public

zeroliken 79 Nearly a Posting Virtuoso

all the browsers I use stopped working. Firefox, Google Chrome, Internet Explorer.
For whatever reason all the sites I try and visit either get an error message

post the error message from the browsers so we can get an idea of what's happening

zeroliken 79 Nearly a Posting Virtuoso

Don't make a Duplicate post

zeroliken 79 Nearly a Posting Virtuoso

thanks .
can some one please tell me that why my sort() function is not working properly???

what exactly happens when you use the sort() function?

zeroliken 79 Nearly a Posting Virtuoso

Make sure to use parentheses in the equation to follow the right sequence of operations

zeroliken 79 Nearly a Posting Virtuoso

you can only use break; in a loop not just in an if statement

zeroliken 79 Nearly a Posting Virtuoso

The array is {1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10}

How would I assign these values randomly in a 5 row and 4 column array?

If the values are already defined in an array you could use the Random() to generate numbers from 0 to 19 and then assign the value from the current index of the array (depending on the random number generated) to a 2d array
In this method you need to check if the random number is already used so as not to assign a duplicate value

or

You could make random numbers from one to ten then check if the number hasn't been used more than twice then assign them in the 2d array... which is a lot easier

zeroliken 79 Nearly a Posting Virtuoso

Maybe this solved thread can help you out
passing file pointer around

zeroliken 79 Nearly a Posting Virtuoso

it will only loop as long as the necessary conditions are met in the while statement to continue the loop

also the first else if condition cannot happen, you cant have a value less than or equal to 2 and at the same time greater than 5

zeroliken 79 Nearly a Posting Virtuoso

But anyway it's OOP

that's a myth...

C++ is NOT an object-oriented programming language it is a language with direct, native support for multiple programming paradigms

zeroliken 79 Nearly a Posting Virtuoso

This is the java forum not c++

zeroliken 79 Nearly a Posting Virtuoso

Its simple just use if else statements

zeroliken 79 Nearly a Posting Virtuoso

%d is an integer format specifier.

in the code you posted it refers to the integer values of passed and failed

I don't think we can explain this better from the links posted by thines01 and JamesCherrill

zeroliken 79 Nearly a Posting Virtuoso

you should have edited your first post instead of creating a duplicate

zeroliken 79 Nearly a Posting Virtuoso
if (ans == "begin")

you can use strcmp from string.h library

zeroliken 79 Nearly a Posting Virtuoso
zeroliken 79 Nearly a Posting Virtuoso
char level;

its suppose to be an integer if your gonna use it in your switch case

zeroliken 79 Nearly a Posting Virtuoso

but as we together do not tutorials for his age, it doesn't do him any good.

You can't learn without em but since he liked it given time he might get used to it... eventually

Will he be able to program in java or c

Since he's 10 i'm guessing that he's self studying programming

Java and c I good for software development (you can search the net for more info)
but they're a bit more complicated than python
Here's a discussion about the Programming languages
Like all programming languages It'll take time to learn

Here's also a list of most used Programming languages(by usage) as a bonus
http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html

zeroliken 79 Nearly a Posting Virtuoso

how about pygame he might find an idea here and help in creating a game, they have tutorial,submitted games, etc...

I'm Sorry if i can't suggest anything more appropriate cause I'm not a python user I usually create programs in Java or c

zeroliken 79 Nearly a Posting Virtuoso

Maybe its because you have negative reputation points or 0 points to Affect Someone Else's Reputation ...just my guess

zeroliken 79 Nearly a Posting Virtuoso

Since he has little knowledge about c++ here's a link to a thread for project ideas for beginners
Projects for beginners
And here's some Ideas for advanced
Advanced and Intermediate Projects

You can learn more in the Python forum

zeroliken 79 Nearly a Posting Virtuoso

well I can't give a full opinion yet I want clear some things first
as I can see he has learned languages for web development and only basic knowledge of software devt languages yet he wants to make a software?

As for the program he wants to make are they for personal use? how long does he want to continue with a project(both in updating it and in usage)? Is it only to pass the time or is it something serious

zeroliken 79 Nearly a Posting Virtuoso

From your other thread...

Are you at least familiar with arrays?

Here's a link from the API
Arrays

well, you may want to check out this link. normally, I would direct you to the array tutorials on the Oracle site, but I seem to have trouble loading the page.
On this page, you'll see how to use arrays and how to work with the index.

zeroliken 79 Nearly a Posting Virtuoso

"I WANT TO MAKE SOFTWARE!

What kind of software does he want to make?

zeroliken 79 Nearly a Posting Virtuoso

Hold your suggestions for just a bit longer :)

I'm currently working on recoding all of DaniWeb from scratch, and there's a complete freeze on the existing system right now.

Good luck on that then

zeroliken 79 Nearly a Posting Virtuoso

IDE: Netbeans
OS: Windows 7 and Ubuntu 11.10

zeroliken 79 Nearly a Posting Virtuoso

thanks ..but even if i use array does that mean that i have to do these like 10,000 times? is there no other way? because ill be doing a program that will output word till "ten thousand and one"

thank you for being patient to me :)

not really the values in the array(words or numbers that will be used)... by my guess should be less than 100

EDIT:

no
about
19 + 7 would suffice for the numbers, and a few extra for the words linked to them

I was right

zeroliken 79 Nearly a Posting Virtuoso

Are you at least familiar with arrays?

Here's a link from the API
Arrays

zeroliken 79 Nearly a Posting Virtuoso

HI im a student and our professor asked us to convert a number into word:

example:
input= "1"
output="one"

i need to have numbers from 1-10,001
so my program will end up very long if i only use if else statement i know that there are other methods other than this please help me thank you

Don't make a duplicate thread

zeroliken 79 Nearly a Posting Virtuoso

the function pow() returns double. So you can use double to hold the value.

using namespace std;

int main()
{
    double i;
    i = pow(2,1000);
    cout<<i<<endl;                 //prints 1.07151e+301

    i = i*4;
    cout<<i<<endl;                 //prints 4.28603e+301

    i = pow(i,((double)1/1002));
    cout<<i<<endl;                 //prints 2

    return 0;
}

this is the c forum use printf() instead of cout

zeroliken 79 Nearly a Posting Virtuoso

What is currently more used ? java ? c++ ?

Here's a link to a thread that has a link to the top 20 list of languages (by usage)
Programming language list

As of this month c++ has moved to 4th place while java remains to be first

zeroliken 79 Nearly a Posting Virtuoso

In short...
In your main function you never assigned a value to multiplication but you try to show its value in line 15

printf("Multiplication of the first %d elements of the array is %d\n", n, multiply_array_elements(ar1, n, multiplication));

It won't work since variable multiplication has no value

But, when I run the program, I always get very big and false numbers.

when you pass multiplication to the multiply_array_elements function what do you think is its first value?

zeroliken 79 Nearly a Posting Virtuoso

Save the the sentence to a string variable then use setText() , then convert the non String variables to string and do the same method

a bit similar to what you done here only thing difference is you'll be storing the output to a string variable beforehand

//	textArea1.setText(String.valueOf(df.format(monthlyPayment)));
zeroliken 79 Nearly a Posting Virtuoso

Definitely, there are big myths about C++ circulating. So, reiterating for the record:
- C++ is NOT an object-oriented programming language (whatever that means), it is a language with direct, native support for multiple programming paradigms.

Most of the people I talked to keeps saying that c++ is object oriented as they often compare it to java

Thanks for enlightening me... at least now I have a vivid Idea about this topic

The opinions are pretty good, but there are some things about C++
I don't agree with.

well that computer science read me thread is outdated(2005) and the info is mostly based from a couple of programmers perspective

zeroliken 79 Nearly a Posting Virtuoso

I think it's a top-down parser
It starts at the top of the program which is line 1 right?

zeroliken 79 Nearly a Posting Virtuoso

This is somehow similar with your other post...

Did you check if the PrelogApp class is in the same directory and in the same package?

zeroliken 79 Nearly a Posting Virtuoso

Is it that exit(10); has no role in the code?

when you use return it tells a function to return execution of the program to the calling function and its value, all code that comes after that will be ignored

And is the function actually printing anything

you can try it yourself to see

zeroliken 79 Nearly a Posting Virtuoso

If you already have an Operating System or any program in the computer you bought then that will take up some space already or some of the memory may be reserved

the memory it takes up is not always 101% accurate... in my opinion anyway

zeroliken 79 Nearly a Posting Virtuoso

Will I.T. survive?

If most of the people in this forum survives it will ;)