Search Results

Showing results 1 to 40 of 108
Search took 0.01 seconds.
Search: Posts Made By: prog-bman
Forum: C++ Apr 16th, 2006
Replies: 2
Views: 5,012
Posted By prog-bman
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.
Forum: C++ Dec 19th, 2005
Replies: 6
Solved: Viva questions
Views: 8,295
Posted By prog-bman
I am not sure what a viva is but it sounds like a test or quiz or homework, so http://www.daniweb.com/techtalkforums/announcement8-2.html.
Maybe if you explain what you were thinking the answers are...
Forum: C++ Dec 5th, 2005
Replies: 9
Views: 16,368
Posted By prog-bman
Ummm. Do your own work

Who comes up with these brilliant ideas?
Forum: C++ Nov 20th, 2005
Replies: 4
Views: 5,057
Posted By prog-bman
(http://daniweb.com/techtalkforums/announcement8-3.html)Tags
Forum: C++ Nov 9th, 2005
Replies: 2
Views: 1,529
Posted By prog-bman
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...
Forum: C++ Nov 5th, 2005
Replies: 9
Views: 1,721
Posted By prog-bman
Exactly what he said I mean you can overload the << to do something like this it is ugly as sin though I think.

#include <iostream>
#include <ostream>
#include <istream>

class Person
{
...
Forum: C++ Nov 4th, 2005
Replies: 9
Views: 1,721
Posted By prog-bman
Well you are probably getting that error because you are not making it a friend of your class it should look similar to this

#include <iostream>
#include <ostream>
#include <istream>
#include...
Forum: C++ Nov 3rd, 2005
Replies: 9
Views: 1,721
Posted By prog-bman
Well. You should change the Person::function(). To p.function().

std::ostream &operator<<(std::ostream &stream,const Person &p)
Forum: C++ Nov 1st, 2005
Replies: 7
Views: 2,940
Posted By prog-bman
Narue,
What are you talking about professors know everything.......
Forum: C++ Oct 28th, 2005
Replies: 7
Views: 2,301
Posted By prog-bman
atoi for converting a char * to an int C or Or stringstreams for C++
Forum: C++ Oct 25th, 2005
Replies: 2
Views: 1,877
Posted By prog-bman
Well there are many different options. If you are looking for some sound libary you can use DUMB (http://dumb.sourceforge.net/index.php?page=about). Or you can check out SDL...
Forum: C++ Oct 25th, 2005
Replies: 4
Views: 16,670
Posted By prog-bman
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:

#include <stdlib.h>
/*Or...
Forum: C Oct 25th, 2005
Replies: 4
Views: 1,955
Posted By prog-bman
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...
Forum: C Sep 29th, 2005
Replies: 7
Views: 2,507
Posted By prog-bman
Like to spam boards?
http://cboard.cprogramming.com/showthread.php?t=70252
Forum: C++ Sep 21st, 2005
Replies: 5
Views: 2,908
Posted By prog-bman
Not really since I have never overloaded the ++ and -- in my travels. Thanks for the information :).
Forum: C++ Sep 21st, 2005
Replies: 5
Views: 2,908
Posted By prog-bman
I am not sure what you wanted this compiles and runs so here added comments for some info.

#include <iostream>//This is the proper header.
using namespace std;//Put everything in the std...
Forum: C Sep 19th, 2005
Replies: 6
Views: 2,230
Posted By prog-bman
Forum: C++ Sep 12th, 2005
Replies: 1
Views: 4,294
Posted By prog-bman
You would need to change your [] operator to return a reference and then you could use that as you would.
Forum: C Sep 11th, 2005
Replies: 3
Views: 1,343
Posted By prog-bman
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?
Forum: C++ Sep 11th, 2005
Replies: 4
Views: 1,393
Posted By prog-bman
Ussually when you are writting the + operator it is not really a member function of a class here is how I would implement it

#include <iostream>
#include <ostream>

class someClass
{
...
Forum: C++ Aug 29th, 2005
Replies: 4
Views: 8,875
Posted By prog-bman
Gooog. Don't recommend that compiler. Go and get a graphics lib like SDL or Allegro you can draw shapes with them.
Forum: C++ Aug 29th, 2005
Replies: 9
Views: 1,961
Posted By prog-bman
What? You need to show some code so we can see what your problem is.
Forum: C++ Aug 29th, 2005
Replies: 12
Views: 3,790
Posted By prog-bman
umm what's with the unneeded goto is while(1) not good enough anymore?
Forum: C++ Aug 28th, 2005
Replies: 12
Views: 3,790
Posted By prog-bman
Here:

while(1)
{
//your code here
}
Forum: C Aug 28th, 2005
Replies: 8
Views: 15,903
Posted By prog-bman
Couldn't you just do something like this? Remeber if this sucks I am not good at the API ;)

#include <windows.h>
#include <iostream>

int main()
{
char buf[30] = {'\0'}; //Null terminate...
Forum: C Aug 22nd, 2005
Replies: 6
Views: 2,717
Posted By prog-bman
What do you mean? You didn't finish your thought there.
Forum: C++ Aug 16th, 2005
Replies: 2
Views: 1,780
Posted By prog-bman
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....
Forum: C++ Jul 30th, 2005
Replies: 5
Views: 1,707
Posted By prog-bman
Here you go.

if(upkeypressed)
{
yPos--;
}
if(downkeypressed)
{
yPos++;
}
Forum: C++ Jul 27th, 2005
Replies: 4
Views: 1,398
Posted By prog-bman
Post questions and if he is intrested he will answer or others will if they are.
Forum: C++ Jul 27th, 2005
Replies: 3
Views: 1,789
Posted By prog-bman
Here we go.

#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...
Forum: C++ Jul 17th, 2005
Replies: 4
Views: 1,895
Posted By prog-bman
I would recommend that you don't use a system("pause").
Forum: C Jul 10th, 2005
Replies: 2
Views: 4,288
Posted By prog-bman
There is no way with cin>> because the input is buffered.
Forum: C++ Jul 7th, 2005
Replies: 8
Views: 2,704
Posted By prog-bman
I think VS 6.0 automatically places a pause after your program has executed.
Forum: C++ Jul 7th, 2005
Replies: 10
Views: 2,714
Posted By prog-bman
It is all about the const :)

#ifndef REF_H
#define REF_H

template<typename T> class ref;

template<typename T1, typename T2>
ref<T1> ref_cast(ref<T2>& r2)
{
Forum: C++ Jul 7th, 2005
Replies: 10
Views: 2,714
Posted By prog-bman
Well when I assign one class to another I ussually just set the data from the one equal to the other via a void operator eg.

#include <iostream>

class foobar
{
public:
void...
Forum: C++ Jul 7th, 2005
Replies: 10
Views: 2,714
Posted By prog-bman
Yes. I believe it is beacuse you defined you operator = with just a reference and not a value. Which the sample_manipulation returns.

#ifndef REF_H
#define REF_H

template<typename T> class...
Forum: C++ Jul 7th, 2005
Replies: 8
Views: 2,704
Posted By prog-bman
Or you could be smart and not use a system command.
http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1042856625&id=1043284385
Forum: C Jul 7th, 2005
Replies: 4
Views: 3,988
Posted By prog-bman
Read this on random numbers http://www.eternallyconfuzzled.com/tuts/random.html
Forum: C++ Jun 16th, 2005
Replies: 4
Views: 1,520
Posted By prog-bman
Code Tags! (http://daniweb.com/techtalkforums/announcement8-3.html)
oh and void main is wrong it should be int main.
Forum: C++ Jun 15th, 2005
Replies: 3
Views: 2,355
Posted By prog-bman
Why are you dynamically allocating total why not just use a regular int?
Showing results 1 to 40 of 108

 


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

©2003 - 2009 DaniWeb® LLC