Search Results

Showing results 1 to 40 of 164
Search took 0.01 seconds.
Search: Posts Made By: Stoned_coder
Forum: C++ Oct 24th, 2005
Replies: 13
Views: 9,340
Posted By Stoned_coder
template member functions may not be virtual but often you can get around this by templating a class rather than a member function. The only reason you cant have template member functions is because...
Forum: C++ Oct 12th, 2005
Replies: 1
Views: 7,327
Posted By Stoned_coder
there is a need and a reason to return arrays and it can be done, you just return a pointer to its first address. If what you meant was an array return by value, i.e. a copy of the array then yes...
Forum: C++ Oct 11th, 2005
Replies: 6
Views: 8,240
Posted By Stoned_coder
private inheritance has its uses. It is similar in effect to composition and nothing like public inheritance. When you become more familiar with c++, you will often find uses for private inheritance.
Forum: C++ Oct 11th, 2005
Replies: 6
Views: 8,240
Posted By Stoned_coder
no its not legal. because you have used private inheritance your class now looks like this.....

class Bird
{
public:
Bird();
virtual ~Bird();
private:
void...
Forum: C Oct 11th, 2005
Replies: 4
Views: 1,739
Posted By Stoned_coder
i prefer....

WINDOWPOS* wp = (WINDOWPOS*)lParam;
Forum: C Oct 11th, 2005
Replies: 4
Views: 1,739
Posted By Stoned_coder
pWinPos is not constant. but you do need a cast. either an old c style or a reinterpret_cast<WINDOWPOS*>(lParam)
Forum: C Oct 7th, 2005
Replies: 1
Views: 1,487
Posted By Stoned_coder
Forum: C++ Oct 6th, 2005
Replies: 2
Views: 8,927
Posted By Stoned_coder
it is. passing a pointer is no different to passing anything else. Its a parameter the same as any other.
Forum: C Oct 5th, 2005
Replies: 3
Views: 1,186
Posted By Stoned_coder
post your score class and we will take a look for you. there isnt enough code to help there. It appears that maybe you have forgotten to write a member func or something similar.
Forum: C Oct 5th, 2005
Replies: 2
Views: 1,175
Posted By Stoned_coder
fmod() can be used with doubles. perhaps your compiler has an fmod that accepts long doubles too.
Forum: C Oct 5th, 2005
Replies: 8
Views: 1,696
Posted By Stoned_coder
Im with narue on this one. I cannot believe you have taught operating system design yet code a small sample with 9 lines on which 2-3 will cause errors. You seem to think the OP will have some clue...
Forum: C++ Oct 4th, 2005
Replies: 4
Views: 3,215
Posted By Stoned_coder
well in c++ you dont need to do that. you can get input like this....

int an_int;
while( ! cin>>an_int )
{
// didnt get an int so deal with that here
cin.clear(); // clear error flags
...
Forum: C++ Oct 4th, 2005
Replies: 8
Views: 14,465
Posted By Stoned_coder
you appear to be mixing managed and unmanaged c++. I dont think you can do that although I aint sure i dont use managed c++
Forum: C Oct 4th, 2005
Replies: 1
Views: 1,548
Posted By Stoned_coder
>>>pls give me an advice

you could start by posting your code and details of any errors you get and we'll help you fix it.
Forum: C++ Oct 4th, 2005
Replies: 2
Views: 4,250
Posted By Stoned_coder
something like

long long int summation(long long int start, long long int howMany)
{
long long sum=0;
for(long long i=0,j=start;i<howMany;++i,++j)
sum += j;
return sum;
}
Forum: C Oct 4th, 2005
Replies: 7
Views: 2,263
Posted By Stoned_coder
biggest overheads with goto is having your peers laugh at you.Also a goto in a function will make life hard for the optimiser to do its job properly so your function may go unoptimised. It is not...
Forum: C Oct 4th, 2005
Replies: 1
Views: 2,319
Posted By Stoned_coder
static int func(); // proto for a static func

class AClass
{
friend int func(); // can be a friend and retains its static linkage
friend int anotherfunc(); // assumed to have external...
Forum: C++ Oct 4th, 2005
Replies: 4
Views: 3,215
Posted By Stoned_coder
perhaps if you explain better what you are trying to do. maybe a small code sample. Why would you need to type check after a cin.
Forum: C++ Oct 2nd, 2005
Replies: 2
Views: 1,152
Posted By Stoned_coder
Its extrememly dated. If you are in any way serious about programming you will want the best tools you can get for free or for the money available. There are many compilers available for free on the...
Forum: C++ Oct 2nd, 2005
Replies: 11
Views: 2,565
Posted By Stoned_coder
understand what the code is doing. In main you make an input file and read it a line at a time. You then pass that line to myjob::read. This is where the parsing occurs. first an istringstream is...
Forum: Game Development Oct 2nd, 2005
Replies: 2
Views: 3,850
Posted By Stoned_coder
Loads here (http://nehe.gamedev.net)
Forum: C++ Sep 30th, 2005
Replies: 8
Views: 14,465
Posted By Stoned_coder
#include<windows.h>??
Forum: C++ Sep 30th, 2005
Replies: 1
Views: 1,195
Posted By Stoned_coder
look at your operators
Forum: C++ Sep 29th, 2005
Replies: 8
Views: 14,465
Posted By Stoned_coder
look up in your helpfiles or at msdn....

the third param to WinMain to get command line as ascii
GetCommandLine() to get the command line as unicode
CommandLineToArgvW() to convert it to an...
Forum: C++ Sep 29th, 2005
Replies: 2
C++
Views: 1,321
Posted By Stoned_coder
we dont do your homework, we only help when you show effort.
Forum: C++ Sep 28th, 2005
Replies: 1
Views: 7,377
Posted By Stoned_coder
know how to write a text file? should be examples in all c++ texts. or alternatively there are a couple of libraries available to do logging, check on sourceforge.
Forum: C Sep 28th, 2005
Replies: 2
Views: 4,121
Posted By Stoned_coder
what operating system?
Forum: C++ Sep 28th, 2005
Replies: 10
Views: 2,659
Posted By Stoned_coder
What compiler are you using?
You will need something reasonably standards conforming. You can get one in my sig.
Forum: C Sep 28th, 2005
Replies: 4
Views: 1,407
Posted By Stoned_coder
And I have told you how they do that. Part of the bootup process is a process called userinit.exe. This is the process that basically starts off the shell once the OS has loaded. You replace the...
Forum: C++ Sep 28th, 2005
Replies: 10
Views: 2,659
Posted By Stoned_coder
what I meant is illustrated below. it breaks my heart to write all of this in the main function but it seems as if you havent learnt functions yet so I tried not to get too far ahead. I have shown...
Forum: C++ Sep 27th, 2005
Replies: 10
Views: 2,659
Posted By Stoned_coder
ok then.
firstly the correct header is <iostream> not <iostream.h>.

using std::cout;
using std::cin;
using std::endl;
can be removed. You have already said that you are using the whole of...
Forum: C Sep 27th, 2005
Replies: 1
Views: 2,066
Posted By Stoned_coder
windows 2k

null pointer assignment 0x00000000-0x0000ffff
user mode 0x00010000-0x7ffeffff
64kb off-limits 0x7fff0000-0x7fffffff
kernal-mode 0x80000000-0xffffffff

windows 98
null pointer...
Forum: C++ Sep 27th, 2005
Replies: 10
Views: 2,659
Posted By Stoned_coder
post some code to show you have attempted the problem if you want help. We dont handfeed you homework answers but will happily help you out if you show effort.
Forum: C++ Sep 26th, 2005
Replies: 2
Views: 2,230
Posted By Stoned_coder
ptr.speak();
ptr.move();
ptr.printName();

not . its ->
Forum: C Sep 25th, 2005
Replies: 2
Views: 2,510
Posted By Stoned_coder
Forum: C Sep 25th, 2005
Replies: 4
Views: 1,407
Posted By Stoned_coder
1) the standard way to do this is to replace userinit.exe in a certain registry key with your app. at the end of your app you must start userinit.exe to complete the bootup.details at msdn just...
Forum: C++ Sep 25th, 2005
Replies: 13
Views: 2,658
Posted By Stoned_coder
int a=rand();
int b=rand();
int c=rand();
std::vector<int> vec;
vec.push_back(a);
vec.push_back(b);
vec.push_back(c);
std::cout<< *std::min_element(vec.begin(),vec.end())<<std::endl;

not a...
Forum: C++ Sep 25th, 2005
Replies: 15
Views: 3,554
Posted By Stoned_coder
yes it is standard, but it took a while for some compilers to catch up, most notably msvc6. There is also a nothrow version of new specified by the standard.
Forum: C++ Sep 25th, 2005
Replies: 8
Views: 2,105
Posted By Stoned_coder
you cant. watch.


int x=0; // global x
int main()
{
int x=1; // main x
{
int x=2; // block x
cout<< x<<endl; // prints block x
Forum: C Sep 21st, 2005
Replies: 2
Views: 5,599
Posted By Stoned_coder
What OS?
bmp is easy. the others require more work.
Showing results 1 to 40 of 164

 


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

©2003 - 2009 DaniWeb® LLC