Ok I'll write something for it.
PM me with the wot you want it to be about.
Printable View
Ok I'll write something for it.
PM me with the wot you want it to be about.
As you know, I'm up for writing a comprehensive tutorial on almost anything (exept bitshifting... I would need to read ken's tut on that 1st :) haha). Keep me in mind!!!
SPH
Okay, lets see if i can sum everything up here:
Betazep - File I/O
Govtcheez - Common stuff from the FAQ board
Ken - Bit manipulation (could you add a really small example line for each one showing it in use?)no-one - binary, hex, and decimal conversions (sounds usefuly. Yeah, do it)
And i've taken a few people up on there offers to help and asked them to do:
minime6696 - sorting methodsshtarker - basic memory management (new, delete)vasanth - Console text manipulation
I just PMed them so they havent responded as of yet but thats what i asked them if they wanted to do...
Better to e-mail me when you've done ([email protected]) so we dont fill this thread up so much. Some of the stuff is likely to be large. I'll compile it then post it here so everyone can look it over one last time before i submit it to the webmaster. No big rush on any of that stuff guys. AFAIK no ones gonna die if they dont get their FAQ update by next week. :)
>>>AFAIK no ones gonna die if they dont get their FAQ update by next week.
Whew... what about by the following week? I really don't want to die yet... ;)
Oh and someone needs to do a simple FAQ on classes over multipe files to include
file.h
file.cpp
main.cpp
class questions come up quite a bit (not to mention homework questions...lol :))
>AFAIK no ones gonna die if they dont get their FAQ update by next week.<
why me?
well never mind im glad to hear that cause i came down with something nasty about 2 days ago, and im still not feeling better, so i may be a little late.
I think we should make a palindrome(sp?) checker tutorial so we don't have to hear the same question over and over again.:D
I could do one for that password question (how do I make asteriks come up instead of letters?) if you want me to.
>>I could do one for that password question
Go for it.
I'm going to be away until next Monday (the 25th) Snowboarding so i wont be responding to anything for a while. Just so everyone knows that if they send me something and i dont get back to you its not cuz i hate you (although i wouldnt make any assumtions... ;) ).
later folks.
How about a howto on Matrix's? Three people have asked pretty much the same question within the past week (me included). So it doesn't seem that allocating a 2D array with 'new' is common knowledge.
I could write a basic one, a long with an alternative using malloc()
PALINDROMEMORDNILAP !!!
#include <iostream.h>
#include <string.h>
#include <ctype.h>
int ispalindrome(char *str);
void main(void)
{
char a[] = "aa";
char b[] = "Bro";
char c[] = "radar";
char d[] = "Radar";
char e[] = "boB";
char f[] = "a";
if(ispalindrome(a))
{
cout << "\n" << a << " is a palindrome";
}
else
{
cout << "\n" << a << " is not a palindrome";
}
if(ispalindrome(b))
{
cout << "\n" << b << " is a palindrome";
}
else
{
cout << "\n" << b << " is not a palindrome";
}
if(ispalindrome(c))
{
cout << "\n" << c << " is a palindrome";
}
else
{
cout << "\n" << c << " is not a palindrome";
}
if(ispalindrome(d))
{
cout << "\n" << d << " is a palindrome";
}
else
{
cout << "\n" << d << " is not a palindrome";
}
if(ispalindrome(e))
{
cout << "\n" << e << " is a palindrome";
}
else
{
cout << "\n" << e << " is not a palindrome";
}
if(ispalindrome(f))
{
cout << "\n" << f << " is a palindrome";
}
else
{
cout << "\n" << f << " is not a palindrome";
}
}
// The magic happens here
int ispalindrome(char *str)
{
int front, back;
front = 0;
back = strlen(str) - 1;
if(back < 0)
{
return(0);
}
while(tolower(*(str + front)) == tolower(*(str + back)) && front <= back) //I used tolower to make sure words
{ //with capitals in them would check ok (see the Radar example in main())
front++;
back--;
}
if(front >= back)
{
return(1);
}
else
{
return(0);
}
}
// cut here ================================
I also have some password program source, which works but was never fully polished (so it has some odd artifacts in the source and is a little ugly). It was made using Watcom C and is graphical, so unfortunately there are a lot of unportable graphical function calls and stuff, but still, if anyone is interested I should be able to find it.
I also have a DeleteAllBut program I wrote
(like the old loveable DOS utility DAB.exe) that does file name wildcard matching. It's around here somewhere too...
Yell if interested.
Rutabega
(still lurking after all these years)
how about just using strcmpi?
if(strcmpi(somestr, sttrev(somestr))==0){
//it's a palidrome
}
Finally have a new e-mail address. Much apologies to those who may have tried sending me stuff in the last nine days (i think it was nine) as i havent been able to retrieve my e-mail for that long. New e-mail: [email protected].
*taps foot* And i'm expecting it to fill up with FAQ submissions soon... :D j/k. Theres still no hurry whatsoever.
soon indeed my brother....
I have two weeks left of school (plus a few days)....
Then == l@D_software_co && FAQs
A topic raised by no-one (Yes "no-one" the coder not "nobody") earlier in this thread that would be utterly priceless - Windows consoles in MSVC or the like.....
We at least get 1 question a day on these....
Topics including;
[list=1][*]Making console cover whole screen[*]Mouse control with consoles[*]Keyboar control with consoles (Arrow keys, escape...)[*]Changing text colour [*]Changing whole console background colour[*]gotoxy() - Already there in FAQ[*]Clear Screen - Already there in FAQ[/list=1]
All of these can be made into general functions (even though they are mostly hacks.....). In their own right, none of them belong on any sort of guide, but I suppose a FAQ is based on questions that are actually asked....not what people should know :)
I can more or less implement all of the above, so if anyone wants me to contribute......say so...