Posts
 
Reputation
Joined
Last Seen
Ranked #3K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
3
Posts with Upvotes
3
Upvoting Members
3
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
2 Commented Posts
0 Endorsements
Ranked #914
~76.6K People Reached
Favorite Forums
Favorite Tags

87 Posted Topics

Member Avatar for humbug

The reason RAND_MAX exists is for the maximum digit the rand() function can return. If you want a quick and dirty random number just use the modulus. Like this: [code] #include <stdlib.h> /*Or <cstdlib> for C++*/ int main() { /*Will return a number between 0 - 9*/ int number = …

Member Avatar for yw_046
2
31K
Member Avatar for sutty8303

Please use [url=http://daniweb.com/techtalkforums/announcement.php?f=8&announcementid=3]code tags[/url] Remeber you are working with a specific range so you are going to need to use the && in your get letter grade function. Also that function needs some other adjustments. You also need to call it from main. Did you even go to class?

Member Avatar for Faisal Kazmi
0
18K
Member Avatar for vegaseat

Well you can read this why gets is bad [url]http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1049157810&id=1043284351[/url]

Member Avatar for soorajshaji
0
2K
Member Avatar for xshashiy
Member Avatar for slygoth
0
224
Member Avatar for Micko

Couldn't you just do something like this? Remeber if this sucks I am not good at the API ;) [code] #include <windows.h> #include <iostream> int main() { char buf[30] = {'\0'}; //Null terminate LPVOID lpMsgBuf; DWORD byteWritten = 0; HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); BOOL ReadFileReturn; HANDLE hFile = CreateFile("MYFILE.TXT", // …

Member Avatar for progneer.soft
0
8K
Member Avatar for LisaJane

Well for one you declare a array with 41 elements and only seem to need 5. And the lovely thing about fstream is operator overloading so if you want to read in something it's very easy. [code] [COLOR=#0000FF]#include[/COLOR] <iostream> [COLOR=#0000FF]#include[/COLOR] <fstream> [COLOR=#0000FF]int[/COLOR] main() { [COLOR=#0000FF]int[/COLOR] i = 0; [COLOR=#0000FF]int[/COLOR] array[5]; …

Member Avatar for peter_budo
0
398
Member Avatar for Truclam

[url=http://daniweb.com/techtalkforums/announcement8-3.html][c[b][/b]ode][/c[b][/b]ode] [/url]Tags

Member Avatar for Nick Evan
0
251
Member Avatar for aminura

I am not sure what a viva is but it sounds like a test or quiz or homework, so [url]http://www.daniweb.com/techtalkforums/announcement8-2.html[/url]. Maybe if you explain what you were thinking the answers are we will be more than glad to help you out.

Member Avatar for charleen
0
294
Member Avatar for blackbabydoll
Member Avatar for AlephOne
0
179
Member Avatar for bg123

I wonder when I get a job if I can post my work and ask people to fill in the blanks for me. Moral of the story what do you need help with not I need help heres my code fill it in.

Member Avatar for Bench
0
178
Member Avatar for akki_freak

Ummm. Do your own work [quote] Write a "Hello World" program in 'C' without using a semicolon [/quote] Who comes up with these brilliant ideas?

Member Avatar for Rashakil Fol
0
353
Member Avatar for Micko

Well the linking error means it finds the prototype of the function but doesn't find the actual defination of the function. I am not sure why it does that since I would not be an VC++ expert. Maybe look up how the pragma comment has to be.

Member Avatar for WolfPack
0
139
Member Avatar for tdizzle342

Narue, What are you talking about professors know everything.......

Member Avatar for tdizzle342
0
299
Member Avatar for server_crash

Well. You should change the Person::function(). To p.function(). [code] std::ostream &operator<<(std::ostream &stream,const Person &p) [/code]

Member Avatar for prog-bman
0
557
Member Avatar for ricciola

Welcome to the forums. 1. When you have a problem(s). Ask a question releating to that problem. 2. Post any realated code with the problem. 3. Wait until someone like me, who is a genius, to help you with your problem ;). Enjoy your stay at the Daniweb C And …

Member Avatar for ricciola
0
217
Member Avatar for atrusmre
Member Avatar for Ancient Dragon
0
117
Member Avatar for gmv

Well there are many different options. If you are looking for some sound libary you can use [url=http://dumb.sourceforge.net/index.php?page=about]DUMB[/url]. Or you can check out [url=http://www.libsdl.org/index.php]SDL[/url]. Or [url=http://www.fmod.org/]Fmod[/url]. But as far as posting code with a graphic and sound that would probably be no use to you.

Member Avatar for prog-bman
0
167
Member Avatar for Acidburn

Good? That is a very broad question. 3D programming is a combo of knowing your the language, knowing some good math and alot of patience. This is not from personal experiance just from looking at some 3d stuff. Here is the best openGL site as far as I know [url]http://nehe.gamedev.net/[/url]

Member Avatar for wally_lawless
0
174
Member Avatar for 123abc

Like to spam boards? [url]http://cboard.cprogramming.com/showthread.php?t=70252[/url]

Member Avatar for 123abc
0
242
Member Avatar for rufusOT

I am not sure what you wanted this compiles and runs so here added comments for some info. [code] #include <iostream>//This is the proper header. using namespace std;//Put everything in the std namespace //not always the best idea but the easiest class Positive_Fraction { public: Positive_Fraction(); Positive_Fraction(int,int); void Print(); // …

Member Avatar for prog-bman
0
396
Member Avatar for vitabrits
Member Avatar for m7r23

So what exactly is your question? Do you need to know how to average, find the second highest, print out the color assiocated with the number?

Member Avatar for Rashakil Fol
0
80
Member Avatar for Puckdropper

You would need to change your [] operator to return a reference and then you could use that as you would.

Member Avatar for prog-bman
0
147
Member Avatar for paradox814

Ussually when you are writting the + operator it is not really a member function of a class here is how I would implement it [code] #include <iostream> #include <ostream> class someClass { public: int getX(); void setX(const int &toSet); someClass &operator=(const someClass &toSet); someClass &operator+=(const someClass &toAppend); friend someClass …

Member Avatar for Rashakil Fol
0
92
Member Avatar for Domo
Member Avatar for l3.azarmehr
0
135
Member Avatar for altheastronut
Member Avatar for iamboredguy

[QUOTE=sunnypalsingh]yaa you an do that but it will be unncessary burden for you i'll suggest you to go for turbo c++ compiler in case you want use graphics it fully supports it[/QUOTE] Gooog. Don't recommend that compiler. Go and get a graphics lib like SDL or Allegro you can draw …

Member Avatar for vegaseat
0
163
Member Avatar for harshchandra
Member Avatar for harshchandra
0
201
Member Avatar for mostuniquename

Code tags please. >what are the member functions here of class Record that can access private data of class Record. Any member function of it own class can access the private data of its class. >and which member functions of class Record can access private data of class Music. None …

Member Avatar for Daishi
0
110
Member Avatar for mozira

Here you go. [code] if(upkeypressed) { yPos--; } if(downkeypressed) { yPos++; } [/code]

Member Avatar for zyruz
0
229
Member Avatar for mozira

Post questions and if he is intrested he will answer or others will if they are.

Member Avatar for Dave Sinkula
0
362
Member Avatar for yaan

Here we go. [code] #include<conio.h> //Non standard header do you really "need" it? //This is the way the headers are no .h's #include<cstdio> #include<iostream> #include<string> //Got to put it in the std namespace using namespace std; //I would recommend some minor style changes. class link_stack { struct node { int …

Member Avatar for Narue
0
180
Member Avatar for AhmedHan
Member Avatar for chriswell

Read This [url]http://www.daniweb.com/techtalkforums/announcement.php?f=8&announcementid=3[/url]

Member Avatar for bgunn
0
217
Member Avatar for mixsir
Member Avatar for zyruz
0
113
Member Avatar for fm_chicago
Member Avatar for Narue
0
363
Member Avatar for bandm

Or you could be smart and not use a system command. [url]http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1042856625&id=1043284385[/url]

Member Avatar for bandm
0
197
Member Avatar for CrazyDieter

Yes. I believe it is beacuse you defined you operator = with just a reference and not a value. Which the sample_manipulation returns. [code] #ifndef REF_H #define REF_H template<typename T> class ref; template<typename T1, typename T2> ref<T1> ref_cast(ref<T2>& r2) { return ref<T1>(static_cast<T1>(r2.c_ptr()), r2.num_ref()+1); } template<typename T> class ref { private …

Member Avatar for CrazyDieter
0
181
Member Avatar for elek

[url=http://daniweb.com/techtalkforums/announcement8-3.html]Code Tags![/url] oh and void main is wrong it should be int main.

Member Avatar for elek
0
182
Member Avatar for drock9975
Member Avatar for drock9975
0
108
Member Avatar for Electrohead

It because you are setting the area at the begging to a garbage value if you want to update the area set it to height * width after the values are inputted

Member Avatar for Electrohead
0
277
Member Avatar for feda
Member Avatar for murschech
0
212
Member Avatar for winbatch
Member Avatar for winbatch
0
693
Member Avatar for kittie
Member Avatar for Narue
0
178
Member Avatar for Rose Aashii

Code tags please. [url]http://daniweb.com/techtalkforums/announcement8-3.html[/url]. Also it is int main not void main.

Member Avatar for alc6379
0
144
Member Avatar for pink
Member Avatar for prog-bman
0
95
Member Avatar for Acidburn

There is no way to do that using just good ol C++. You would have to go into system dependent console stuff. If you are using windows check out this site for a look into how to do some window console specific stuff. [url]http://www.adrianxw.dk/SoftwareSite/Consoles/Consoles1.html[/url]

Member Avatar for prog-bman
0
135
Member Avatar for jhdobbins

[quote] First, how do you feel about operator overloading? [/quote] As Narue says it is handy sometimes but it really isn't necessary but I do use it ;) [quote] Second, I am thinking of buying Visual Studio 2003... I can get it at a pretty good price and was just …

Member Avatar for jhdobbins
0
103
Member Avatar for atrixnet

"*" are pointers they point to a memory address. Dave and Narue are not trying to be mean and cryptic. They are just trying to get you to work things out on your own. Most of us fell that it is a disservice to tell you everything and you not …

Member Avatar for Narue
0
618
Member Avatar for pink

1. Use complete sentences to describe what you are trying to accomplish so someone can understand what you are asking. So they do not have to lower themselves to a third grade level of reading to know what you are trying to ask. 2. Use code tags when posting code. …

Member Avatar for peter_budo
0
89

The End.