Search Results

Showing results 1 to 40 of 1000
Search took 0.06 seconds.
Search: Posts Made By: firstPerson
Forum: C++ 38 Minutes Ago
Replies: 5
Views: 82
Posted By firstPerson
I feel nice today so I will help you :

Define a Double Linked Lists EmpRank where the data should be of type integer.


#include<iostream >
using namespace std;
int main(){
cout<<"Here is...
Forum: C++ 47 Minutes Ago
Replies: 3
Views: 51
Posted By firstPerson
This is what I mean :


struct Item {
string Id;
string Name;
string barCode;
//more stuff
};
Forum: C++ 4 Hours Ago
Replies: 3
Views: 51
Posted By firstPerson
What you should have is make the Product class composed of an another
class. The another class should hold all the data thats needed, like
name or barcode.

Then you can use that as a parameter...
Forum: Computer Science 23 Hours Ago
Replies: 2
Views: 119
Posted By firstPerson
You need to fix your grammar as pointed out earlier.
Forum: C++ 1 Day Ago
Replies: 2
Views: 102
Posted By firstPerson
Most likely its raw definition will be something like this :


void swap(char& a, char& b)
{
char temp = a;
a = b;
b = temp;
}
Forum: C++ 1 Day Ago
Replies: 3
Views: 125
Posted By firstPerson
In bubble sort when every you swap print out the array.

In selection sort, whenever you swap print out the array.

Also your functions : showArray1 and showArray2 is repetitive to each
other....
Forum: C++ 1 Day Ago
Replies: 3
Views: 99
Posted By firstPerson
Yep If I am reading correctly, then you need to check the collision between
objects in your room, so they "interact" with each other.
Forum: C++ 1 Day Ago
Replies: 3
Views: 164
Posted By firstPerson
If this is what you are looking for :

enter a word : hello
hello backwords is : olleh


then all you have to do is use a for loop, start from strlen(str)-1 , to >= 0 and print out at index...
Forum: Geeks' Lounge 1 Day Ago
Replies: 21
Views: 663
Posted By firstPerson
when you program a game of programming a game in your dream.
Forum: C++ 2 Days Ago
Replies: 7
Views: 175
Posted By firstPerson
I think he means something like this :


Enter 10 numbers : 10 9 8 7 6 5 4 3 2 1

The reverse of those inputs are : 1 2 3 4 5 6 7 8 9 10


Is this right, maverick?
Forum: C++ 2 Days Ago
Replies: 2
Views: 161
Posted By firstPerson
What exactly do you need help with?

A composition is when your class is composed of some object.

Here is an example :

class Name { public : string aName; };


since string is a class...
Forum: Java 2 Days Ago
Replies: 3
Views: 142
Posted By firstPerson
>>note the question ask to reprint the array but without any repeating number

You can use the library sort method and then display the first element.
Compare it with its adjacent, if different...
Forum: C++ 2 Days Ago
Replies: 3
Views: 165
Posted By firstPerson
Another way is to make a get/set functions.
Forum: Java 2 Days Ago
Replies: 1
Views: 118
Posted By firstPerson
It is converting it correctly. It just doesn't display the trailing 0's.

If you want to see the trailing 0's then you can use DecimalFormat...
Forum: Geeks' Lounge 2 Days Ago
Replies: 21
Views: 401
Posted By firstPerson
Well its school time so some might not have time.
Forum: C++ 3 Days Ago
Replies: 2
Views: 131
Posted By firstPerson
Just create some functions, for example a function for addition would
look like this :


int addNumbers(int number1, int number2){
return number1 + number2;
}


And you can do similar...
Forum: C++ 3 Days Ago
Replies: 5
Views: 148
Posted By firstPerson
Actually you can also use Pythagorean. Make a right trials with the end point from the center of the sprite and the mouse clicked point, then
all you have to do is rotate the sprite by using the sin...
Forum: C++ 3 Days Ago
Replies: 5
Views: 142
Posted By firstPerson
How to use functions :

1) Declare a prototype .

Ex :

//int is the return type
//calculateBonus is the function's name
//int number is its argument
// the semicolon " ; " means its a...
Forum: C++ 3 Days Ago
Replies: 6
Views: 151
Posted By firstPerson
Yep I guess, you can use if statements to sort this.
Forum: Geeks' Lounge 3 Days Ago
Replies: 21
Views: 663
Posted By firstPerson
Oldy!

When you give out your number to girls in binary.
Forum: C++ 3 Days Ago
Replies: 5
Views: 148
Posted By firstPerson
First you need to get the mouse's position. Then you need to know the
position vector of the sprite. Then you need to rotate the sprite
until its axis aligned with the where the mouse is. You can...
Forum: C 3 Days Ago
Replies: 8
Views: 221
Posted By firstPerson
>>PS: i already searched on the internet

Then obviously you haven't searched at daniweb.

Anyhow, do you first know how to generate a number from a min to max?
Forum: C++ 3 Days Ago
Replies: 3
Views: 161
Posted By firstPerson
Thats not going to be very easy for a beginner. What part do you need
help with? Also is the function for (2) correct? Is that column's law.
Forum: C++ 3 Days Ago
Replies: 5
Views: 148
Posted By firstPerson
How are you getting the sprite to be displayed, meaning what graphics library are you using?
Forum: C++ 3 Days Ago
Replies: 25
Views: 775
Posted By firstPerson
What have you really learned in the class so far, what concepts?

You haven't learned about functions or you don't want to use functions?

Can you use the standard functions?

Think of all...
Forum: C++ 3 Days Ago
Replies: 3
Views: 161
Posted By firstPerson
Don't waste your time. Opengl has been created when a group
of Genius's got together and built a very well graphics library.
There is no reason to do this. And I doubt that pure C++ can do
what...
Forum: C++ 3 Days Ago
Replies: 25
Views: 775
Posted By firstPerson
In psuedocode of course :


void insertionSort(int * Array, int size)
{

//declare minElem variable to 0

//for i = 0 to i < size, increment i by 1
{
Forum: C++ 3 Days Ago
Replies: 25
Views: 775
Posted By firstPerson
well since since there are 5! possible combination, the minimum
number of if stated you will use is 2^5 = 32.

That will suck.

Just use insertion sort, the idea behind it is to mid a max*...
Forum: Geeks' Lounge 3 Days Ago
Replies: 21
Views: 459
Posted By firstPerson
From stranded island to hofner, cool!
Forum: C++ 3 Days Ago
Replies: 9
Views: 334
Posted By firstPerson
By looking at the figure,what can you tell me about the; line by line?
Forum: C++ 4 Days Ago
Replies: 1
Views: 217
Posted By firstPerson
Take it step by step.

create this part first :

Enter values in first array: a h b c u v I j k e
Enter values in Second array: y u d f g k I w q a


Then create this part :
Forum: C++ 5 Days Ago
Replies: 11
Views: 336
Posted By firstPerson
Yea, or that.
Forum: C++ 5 Days Ago
Replies: 3
Views: 88
Posted By firstPerson
>>void class::getNumberOfoBJECTS(HOW DO I PASS FILENAME HERE?)
<<
I guess you were not listening.


void class::getNumberOfoBJECTS(string fileName) {
fstream* file = new...
Forum: C++ 5 Days Ago
Replies: 11
Views: 336
Posted By firstPerson
Letting the standard function handle initialization and forget about
using for loops. Or use something like, int A[2] = {1,2} and let the compiler generate any compile time error there may
be.
Forum: C++ 5 Days Ago
Replies: 4
Views: 264
Posted By firstPerson
There are many ways, I will show you one way :


#include <iostream>
#include <sstream>
#include <string>


using namespace std;
Forum: Geeks' Lounge 5 Days Ago
Replies: 21
Views: 459
Posted By firstPerson
If yu wer strnded in a is_land ten wat wud u brin , u gt at mst fiv tings and no triky buzzness, understand?

I would bring (1)Angelina Jolie, then my (2)laptop (with infinite battery life,
that...
Forum: C++ 5 Days Ago
Replies: 5
Views: 213
Posted By firstPerson
Yes, but what he is doing is wrong. If you use nothrow
when allocating for memory, then first could be null, if it failed to allocate memory.

like this :

int *p = new(nothrow)...
Forum: C 5 Days Ago
Replies: 4
Views: 227
Posted By firstPerson
If practice is what you want then

google1 (http://hkn.eecs.berkeley.edu/~dyoo/cs3/recursion-problems.pdf)

google2 (http://hkn.eecs.berkeley.edu/~dyoo/cs3/recursion-problems-2.pdf)
Forum: C 5 Days Ago
Replies: 9
Views: 250
Posted By firstPerson
Its undefined, google sequence points.

Aia I like your avatar.
Forum: C++ 5 Days Ago
Replies: 8
Views: 199
Posted By firstPerson
just a simple if statement will do before the calculation.

if input is -1 then return 0
else carry on with the calculation.
Showing results 1 to 40 of 1000

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC