Search Results

Showing results 1 to 40 of 47
Search took 0.01 seconds.
Search: Posts Made By: Stoned_coder ; Forum: C and child forums
Forum: C Oct 11th, 2005
Replies: 4
Views: 1,745
Posted By Stoned_coder
i prefer....

WINDOWPOS* wp = (WINDOWPOS*)lParam;
Forum: C Oct 11th, 2005
Replies: 4
Views: 1,745
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,502
Posted By Stoned_coder
Forum: C Oct 5th, 2005
Replies: 3
Views: 1,189
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,178
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,701
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: 1
Views: 1,570
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: 7
Views: 2,271
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,353
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 Sep 28th, 2005
Replies: 2
Views: 4,151
Posted By Stoned_coder
what operating system?
Forum: C Sep 28th, 2005
Replies: 4
Views: 1,415
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 27th, 2005
Replies: 1
Views: 2,104
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 25th, 2005
Replies: 2
Views: 2,533
Posted By Stoned_coder
Forum: C Sep 25th, 2005
Replies: 4
Views: 1,415
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 21st, 2005
Replies: 2
Views: 5,633
Posted By Stoned_coder
What OS?
bmp is easy. the others require more work.
Forum: C Sep 20th, 2005
Replies: 5
Views: 1,379
Posted By Stoned_coder
Because in code 1 the string "sunny" is readonly. In code 2 the string "sunny" is writeable to.
Forum: C Sep 16th, 2005
Replies: 7
Views: 1,979
Posted By Stoned_coder
assuming EX and OH are defined somewhere as non-zero ints then something like this can keep your checking routines simple.

int MainWindow::IsWinner()
{
// this holds the patterns we will...
Forum: C Sep 16th, 2005
Replies: 2
Views: 1,240
Posted By Stoned_coder
its an .exe. Post the source I dont mind looking it over but posting an exe is not such a good idea.
Forum: C Sep 16th, 2005
Replies: 7
Views: 1,979
Posted By Stoned_coder
of course it would.
Forum: C Sep 14th, 2005
Replies: 5
Views: 8,093
Posted By Stoned_coder
nope. what you propose is immoral at the very least. you plan on using computer hours in a public cafe for no charge surrepticiously. I doubt anyone here will tell you how this is done.
Forum: C Sep 13th, 2005
Replies: 4
Views: 1,372
Posted By Stoned_coder
when you want arrays, 99% of the time you actually want a std::vector
Forum: C Sep 11th, 2005
Replies: 5
Views: 8,093
Posted By Stoned_coder
why would you want to do that?
Forum: C Aug 28th, 2005
Replies: 3
Views: 3,196
Posted By Stoned_coder
Playing with VGA. You will probably benefit from this (http://www.brackeen.com/home/vga/) . It shows you how to use VGA properly.
Forum: C Aug 27th, 2005
Replies: 7
Views: 4,615
Posted By Stoned_coder
For starters I would rework your validation code. You can use strchr and atoi to walk the dd/mm/yyyy string and pull out the ints or even sscanf. Make your validation code simpler and you may find...
Forum: C Aug 27th, 2005
Replies: 7
Views: 4,615
Posted By Stoned_coder
ok we are halfway there. Now maybe you could enlighten me as to the specific problems you are having.
Forum: C Aug 27th, 2005
Replies: 7
Views: 4,615
Posted By Stoned_coder
code looks horrible. If you seriously want help then you should tag it with code tags to make it more readable and friendly to look thru.
Forum: C Aug 17th, 2005
Replies: 8
Views: 2,085
Posted By Stoned_coder
Are those ints in the vector dynamically allocated? why on earth do you think you are leaking memory?
Forum: C Aug 15th, 2005
Replies: 4
Views: 2,916
Posted By Stoned_coder
your answer lies in part3 of adrians findfirst tut.
Forum: C Aug 13th, 2005
Replies: 2
Views: 9,698
Posted By Stoned_coder
argc and argv (http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1046139290&id=1043284392)
Forum: C Aug 12th, 2005
Replies: 2
Views: 8,114
Posted By Stoned_coder
int a=123;
ostringstream os;
os<<a;
string s = os.str();


string s("123");
int a;
istringstream is(s);
is>>a;
Forum: C Aug 12th, 2005
Replies: 6
Views: 1,397
Posted By Stoned_coder
Associated with cin are a set of error flags. The important one at this time is the fail flag. If the cin>>input goes to plan and grabs an int then this expression returns true through the overloaded...
Forum: C Aug 12th, 2005
Replies: 6
Views: 1,397
Posted By Stoned_coder
In general you can do something like this although you should drop the deprecated headers for the std headers.

int input;
while(!(cin>>input))
{
cerr<<endl<<"enter an int...
Forum: C Aug 9th, 2005
Replies: 15
Views: 2,504
Posted By Stoned_coder
Ok so you wanna look like a dick!

scanf("%d",&i);
for(j=1;j<=i;j++)
{
printf("enter the %d element",j);/*comparing and finding the largest number*/
scanf("%d",&a[j]);
}

enter 100
Forum: C Aug 8th, 2005
Replies: 15
Views: 2,504
Posted By Stoned_coder
indian scorpion dont you like array[0] for some reason. remember in c/c++ arrays are zero based not 1 based.Its possible for that prog to segfault. Also its not a good idea to give homework answers...
Forum: C Aug 8th, 2005
Replies: 5
Views: 2,337
Posted By Stoned_coder
im betting the newline thing is the newline left in buffer by fgets(). Check the docs for fgets() and you will see that it leaves a newline in the buffer that often you want removed. You haven't...
Forum: C Aug 7th, 2005
Replies: 15
Views: 2,504
Posted By Stoned_coder
how would you do it in your head especially if you had a poor memory.
You would loop through your list, examine first number and write it down on a bit of paper.Then you would look at next number if...
Forum: C Aug 7th, 2005
Replies: 2
Views: 1,037
Posted By Stoned_coder
Well we're not psychics. Let me just look thru the provided source and we'll see your problem.
Forum: C Aug 7th, 2005
Replies: 5
Views: 2,337
Posted By Stoned_coder
not looking at code improperly formatted. please edit your post to include code tags if you want help.
Forum: C Aug 7th, 2005
Replies: 2
Views: 9,351
Posted By Stoned_coder
What OS are you on? What compiler are you using? If you are on true DOS this was accomplished using interrupt routines. Google for ralf browns interrupt list and there should be some info in there....
Forum: C Aug 5th, 2005
Replies: 10
Views: 2,603
Posted By Stoned_coder
well i dont see a strcpy in your code. Anyway you could use memset to zero the array. look it up in your helpfiles.
Showing results 1 to 40 of 47

 


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

©2003 - 2009 DaniWeb® LLC