Those books are not for free, you need to buy them.
Asking for the PDF version of Text books constitutes attempt of piracy, I hope you realize that.
Anyways a warning has been given.
Those books are not for free, you need to buy them.
Asking for the PDF version of Text books constitutes attempt of piracy, I hope you realize that.
Anyways a warning has been given.
Hello there.
I always get suspicous when I click the "view new posts" button for a thread that I don't remember seeing recently, and it jumps me right to the last post... I then double-check the date before replying.
No harm in replying to bumped posts as long as you can contribute something of importance or something which would help out a person.
Earlier we used to close bumped threads (oh those days), but nowadays with the dictum of "let conversations flow", we are not encouraged to close bumped threads and if possible allow people to add useful content to the threads.
So no need of double checking, if you feel there is something you must point out, do so. No one will say you anything for replying to a bumped thread. After all, we mods can just take the bumped questions along with your replies and create a new thread out of it.
Thank you.
Hey there my friend Joey, welcome to the elite club...:D
If I get time someday, I would definately go through your blog enteries and see the kind of magic you have woven in them...;)
If you want to get a Featured Blogger badge for yourself, then follow the joeprogrammer example and simply make regular, relevant and interesting posters...
Wish had enough time for all these things...*sigh*
Congrats Roryt, hope you keep submitting your tuts to help newbies out....:D
PS: BTW Joey I didn't know you had a blog let alone the fact that you have become a featured blogger....;) Congrats on that one.
Hey there welcome to Daniweb, hope you get all the required help here. :D
You get your houses' location pinpointed in Google Earth.
I put in smoke.
Universe -> Infinite
I am sure you meant cin >>
I wonder what you had just before logging in....;)
Keep in mind, cin >> is the C++ version of C's scanf() and must be used appropriately. IMAO that means -- don't! ;)
But I don't change my stmt:
Yes true, but if already used, why not make it a bit more er... robust...:D
[edit]Cripes, this Ravalon guy is everywhere...;)[/edit]
(1) Programming\tfgh-----.cpp(30) : error C2562: 'triangle' : 'void' function returning a value - this points to the line " return starCount;
You are trying to return value from a function whose return type has been declared void. Why would you want to return the starcount from your function if it is already achieving the purpose of drawing out the tirangle ?
(2) Programming\tfgh-----.cpp(24) : see declaration of 'triangle'
This points to the line "void triangle(int n, int starCount, int rowLength)"
Ditto here too. You have given the prototype of your function "triangle" as one taking an integer and returning nothing i.e. void. So why define your function with 2 extra parameters as "void triangle ( int n, int starcount, int rowlength )"
Read my previous post in which I have already given you the guidelines to solving the problem.
I did compile with full warnings, but my compiler isn't that smart.
I can fairly bet that its a MS Compiler....:D
Subconsciously making the snippet look more complex than it needed to be I guess.
You show all signs of a frustrated C++ programmer.:cheesy:
Yes true, but if already used, why not make it a bit more er... robust...:D
A few guidelines:
1. Don't use non standard functions ( getche( ) ) and non standard headers ( conio.h ) since they make your code non portable ( i.e. your code won't compile on compilers other than the one which you are currently using)
2. The main concept behind the use of functions is that a task is delegated to it by the main program or the driver program. The main program or the calling function just expects the function to do the required task for it. How the task is achieved is the function's lookout.
3. If you go out to extend this concept, we can divide the program in roughly two parts -- the input accepting stage and the computation stage.
4. The input gathering stage takes place in your main loop i.e. the entry point of your program. So what remains is the computation part.
5. The computation part can be seperated out from the main program by providing it exactly the amount of data which it requires for performing the computation, which in this case is "rowheight".
6. So create a function which accepts the "rowheight" from the main program, performs the computations on it (in this case rendering the triangle) and returns to the main( ) function after performing its job.
A skeleton:
void render_triangle( int height )
{
int row_length = 0 ; // initialize your variables to prevent bugs.
int star_count = 0 ;
// …
Days come and go, only memories remain.
flushall() is not a standard function so you cannot expect it to work. You use cin.ignore() in C++.
#include <iostream> #include <limits> int main() { using namespace std; char letter = 0; cout << "Please type one letter: "; cin.get( letter ); cout << "The next character is: " << (int)cin.get() << '\n'; cout << "Please type one letter: "; cin.get( letter ); cin.ignore( numeric_limits<streamsize>::max(), '\n' ); cout << "The next character is: " << (int)cin.get() << '\n'; return 0; }
Though it would be really better if cin.clear( ) was placed before the call to cin.ignore( ) to deal with corrupted input stream along with the stray characters or junk in it. (eg. user enters a float in place of character).
On another site im on we have a seperate site setup for the NEWSLETTER and every month it is updated....
Maybe we can do the same here?? (http://www.daniwebnews.com for example)
...or maybe employ more pigeons....:cheesy:
struct { char suit; std::string face; int value; } deck[52];
Ravalon, have you enabled all the warnings in your compiler settings (-Wall) since the above flags a warning saying "error: no matching function for call to `random_shuffle(<anonymous struct>[52], <anonymous struct>*)' ". You better name the struct just for standard's sake, its not good to let warnings hang around in your programs.
It is a function call. random_shuffle() is a standard C++ function from the <algorithm> header. It saves you the trouble of writing your own shuffling code.
...with such talk of random_shuffle, I would recommend the people to read this.
namespace Raye { template <class T> inline void swap( T& a, T& b ) { T temp = a; a = b; b = temp; } template <class T> inline void random_shuffle( T *first, T *last ) { if ( first != last) { for ( T *i = first + 1; i != last; i++ ) { T *b = first + rand() % ( i - first + 1 ); T temp = *i; *i = *b; *b = temp; } } } }
I wonder why you wrote the swap subroutine...;)
LOL. Actually it's a pretty cool game, making you multi-task like that... plus I have a competitive edge in me, which sometimes causes me to act immaturely... :cheesy:
Competitive environment is what drives me...;)
Oh and btw I just got 36.609 seconds :D
Oh and btw I got 39.752 seconds :cheesy:. (told you so...)
something -> everything
Satisfied not many people are, but still we must learn to be happy.
hit by it.
Several powerfull frequent losers, filled with ANGST, exploding.
Nothing wrong with it, its just that nobody outside educational instutions use it.
Not completely true. Though Lisp has come to a stage where its name is not heard in the mainstream software senario like that of Python or C# or Java, but its still out there, live and kicking.
Quoting Mr. Kent Pitman:
Please don't assume Lisp is only useful for Animation and Graphics, AI, Bioinformatics, B2B and E-Commerce, Data Mining, EDA/Semiconductor applications, Expert Systems, Finance, Intelligent Agents, Knowledge Management, Mechanical CAD, Modeling and Simulation, Natural Language, Optimization, Research, Risk Analysis, Scheduling, Telecom, and Web Authoring just because these are the only things they happened to list.
YOu get blown off.
I put in some grass.
but suddenly it
We ignored it
I didn't get it.
How was it supposed to reach us, via pigeons ? ;)
Hey there my windsurfer friend, welcome to Daniweb :D
Hello there buddy, welcome to Daniweb. :D
Hey there buddy, happy new year to you too and welcome to Daniweb. :D
Does this satisfy your curiosity ?
You get to nurture a good hobby.
I put in a tennis ball.
king -> nothing
came at us,
Save me (Shinedown)
Several POWERFUL antidisestablishmenterianistic losers, filled with monks, exploding.
~s.o.s~ and joeprogrammer are behaving like 5 year old boys. :)
...which we actually are. ;)
Hell even Joey would admit to that. :mrgreen:
Hello there.
I didn't mean for it to get taken the wrong way; sorry.
Ah..don't take it the wrong way Mr. Joe, I didn't mean to shoot you down or something like that, just discourage any further discussion on the topic. If know from forum interactions that you for one wouldn't start anything remote to a flame war or a debate. You are one of the core and responsible members of Daniweb, so I thought you would understand my comment.
Thank you.
Hello there.
You're right - I guess I was thinking in terms of dynamic memory allocation...
Ah..just to clear the matters up...even if we dynamically allocated 2.9KB of memory, it wouldn't be such a problem, unless of course, you were doing realloc i.e. allocating memory during runtime and exceeding the limitations imposed by the current memory model of the compiler.
Thank you.
Way to go Roryt...:D
Hello there.
Either that, or you have some miniscule amount of RAM in your computer. What's your compiler? It's highly unlikely, but a crappy old compiler has much different limits than a modern one.
Yes, an old compiler imposes a limit on the amount of memory that can be allocated to a single variable, but if that were the senario, the program execution would have halted at the point he has declared the three dimensional array.
I hope you realize that even though he hasn't stored any values initially in his array, the space has been nonetheless allocated to him. I don't think any failed attempt after the allocation is due to the old compiler.
And as far as RAM is concerned, he is allocating 729 * 4 bytes ~ 2.85 KB. I don't think this should be as such a problem...;)
Thank you.
Sentences can consists of questions as well as answers.
Many POOR antidisestablishmenterianistic losers, filled with spywares, crying.
tired -> fatigue
thing I was
I don't think there is any other way than command line arguments since the ways in which a program receives data are:
1. Standard input (keyboard in most cases)
2. File stream (reading data from files)
3. Command line arguments
Since you don't require 1 and 2, you obviously have to go with the third choice, that is command line arguments.
Now just a simple test:
1. Create a project "Driver" which willl contain a single file driver.cpp with contents:
#include <iostream>
using namespace std;
int main(int argc, char **argv)
{
int n1, n2;
// This program expects to get two numbers in argv.
// So the value of argc must be 3.
if( argc != 3)
{
printf("wrong number of arguments\n");
return 1;
}
n1 = atoi(argv[1]);
n2 = atoi(argv[2]);
cout << "The output in the driver program is " << n1 + n2 ;
return 0;
}
2. Compile the project so that the executable is created (driver.exe)
3. Create a project "Main" which will contain a single file main.cpp with the following contents:
#include <iostream>
int main()
{
system("driver 12 13") ;
return 0;
}
4. Make sure the project "Main" and "Driver" are in the same directory (just for our convinience) along with their executables.
5. Compile and Run the main.cpp and you will see the expected output. Try this and see if it works in your case.
Good, thanks. I was getting restless not knowing whom I would be encountering in there....;)
Hello Miss Dani.
Has the layout for "IRC Chat Network" page being changed wherein the names of the people in the channel are no longer displayed ?
I would really like to know why the change in the layout has been brought about, since I can no longer view the member list who are currently in the chat room.
Thank you.
~s.o.s~
Silence echoed in...
fair maiden asked.
"Do you really..