Search Results

Showing results 1 to 25 of 25
Search took 0.02 seconds.
Search: Posts Made By: Aia ; Forum: C++ and child forums
Forum: C++ Oct 2nd, 2008
Replies: 10
Solved: Quick question
Views: 847
Posted By Aia
A comment if I may bhoot_jb.


You make heavy use of [..]. I know what ellipsis are [...], but I can't figure what's the process that warrant the use of two consecutive periods.


What's the...
Forum: C++ Oct 2nd, 2008
Replies: 10
Solved: Quick question
Views: 847
Posted By Aia
If you don't want to exit don't use the function exit() which will terminate the program.

sentinel set to not done
while not done:
menu options:
switch:
option 1:
...
Forum: C++ Oct 1st, 2008
Replies: 10
Solved: Quick question
Views: 847
Posted By Aia
Perhaps consider a menu using a switch (http://www.cprogramming.com/tutorial/lesson5.html) case construction?
Forum: C++ Jul 9th, 2007
Replies: 62
Solved: Permutation
Views: 11,188
Posted By Aia
!!!!! WARNING YOUR COMPUTER MAY BE INFECTED WITH SPYWARE!!!! PAY AN OVER PRICED AMMOUNT TO HAVE SOMTHING FIXED WE PLACED THERE IN THE FIRST PLACE!!!!!!!!!

sound familiar, know how to block...
Forum: C++ May 14th, 2007
Replies: 7
Views: 2,761
Posted By Aia
Dev C++ doesn't know about #include < conio.h>
getch() is why conio.h is needed.
change getch for getchar and it will not complain. You do not need conio.h.
Forum: C++ Apr 8th, 2007
Replies: 3
Solved: compile error
Views: 1,448
Posted By Aia
Put them any where before the main function. Kind like the same way
you put prototypes of functions before main.

By the way, void main should be int main(void)
Forum: C++ Apr 4th, 2007
Replies: 5
Views: 6,307
Posted By Aia
system("PAUSE"); the program waits for you to enter a key
system("CLS"); clears the console or command line terminal

both of makes your program not portable since is operating system
depended
Forum: C++ Mar 27th, 2007
Replies: 13
Views: 2,899
Posted By Aia
Don't bit yourself up, you couldn't help it.;)
Forum: C++ Mar 26th, 2007
Replies: 13
Views: 2,899
Posted By Aia
Thank you. Much appreciated.
Forum: C++ Mar 26th, 2007
Replies: 13
Views: 2,899
Posted By Aia
Mister Joeprogrammer,
Am I correct, then, in assuming that this way of reference in a function is something different for C++ than for C? I know you can not do it in C, but my C++ is very limited.
Forum: C++ Mar 26th, 2007
Replies: 4
Views: 1,262
Posted By Aia
D_Nath[i]=PI*D[i]/er[i]*.76554;

You forgot to change the () for [] inside statement inside the loop
Forum: C++ Mar 26th, 2007
Replies: 13
Views: 2,899
Posted By Aia
The first line I think is because in the prototype you have the first
parameter as an int and in the actual function is a int array.

I always copy my function and use it as a prototype, just...
Forum: C++ Mar 26th, 2007
Replies: 13
Views: 2,899
Posted By Aia
remove the & after the last int in the bool Bsearh fuction




You are missing an ending bracket for the first else. The one right after while belongs to the do/while loop.
Forum: C++ Mar 23rd, 2007
Replies: 15
Solved: Exponitial Loop
Views: 1,953
Posted By Aia
Yeah, it helps to know what you want to do, first. :)
Forum: C++ Mar 23rd, 2007
Replies: 15
Solved: Exponitial Loop
Views: 1,953
Posted By Aia
What you are doing is:

2^5 = 2 * 2 * 2 * 2 * 2 = 32
That is correct.

#include <iostream>
#include <math.h>

using namespace std;
int main()
Forum: C++ Mar 23rd, 2007
Replies: 15
Solved: Exponitial Loop
Views: 1,953
Posted By Aia
What I meant was:

Declare another float or better yet a double variable at the begining of
main. Then assign the result of the pow function to that variable.

Then do what you wish with that...
Forum: C++ Mar 23rd, 2007
Replies: 15
Solved: Exponitial Loop
Views: 1,953
Posted By Aia
a_variable_float = pow(a,b);
Forum: C++ Mar 23rd, 2007
Replies: 15
Solved: Exponitial Loop
Views: 1,953
Posted By Aia
#include <math.h>

pow(base, exponent);
Forum: C++ Mar 23rd, 2007
Replies: 14
Views: 5,465
Posted By Aia
The function getch is a compiler especific function, meaning that is not
standard so you can not use it with every C compiler.
Stay away from it. Getchar is the standard, use it, and build good...
Forum: C++ Mar 23rd, 2007
Replies: 14
Views: 5,465
Posted By Aia
When you program for a console window, the program just do what
you ask to do, and then exit returning control to the operating system.
That's why "the black screen just flashes". In orden to see...
Forum: C++ Mar 19th, 2007
Replies: 8
Views: 2,052
Posted By Aia
You are doing something different then. This code works as explained.

#include <iostream>

using namespace std;

int main() {

int a[5] = {1,2,3,4,5};
int *aptr = a;
Forum: C++ Mar 19th, 2007
Replies: 8
Views: 2,052
Posted By Aia
When you asign a pointer to an array you don't use the & operator.

int *aptr = a;



cout << *( aptr + i ) will do it. Notice the "*" outside the parenthesis, and the i to index the...
Forum: C++ Mar 13th, 2007
Replies: 6
Views: 2,714
Posted By Aia
I am very sorry that we couldn't help you. I thought that by going down with what your code would do, step by step you would see that it has some problems. My bad there.

I understand that english...
Forum: C++ Mar 13th, 2007
Replies: 10
Solved: Code analysis
Views: 2,105
Posted By Aia
for( x = 2; x < 100; x++ ) This for loop will start with the value 2 stored in x and
check every time if is less that 100, so it will never reach 100 numbers but 99, since at the 100th time it will...
Forum: C++ Mar 12th, 2007
Replies: 6
Views: 2,714
Posted By Aia
Let's say you pass the array int A[] = { 1, 2, 3, 4 };
and that the int n is iqual to the number of elements in the array,
in this case 3 since starts at element 0.
This sorting function is going...
Showing results 1 to 25 of 25

 


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

©2003 - 2009 DaniWeb® LLC