dev-cpp-users Mailing List for Dev-C++ (Page 614)
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
You can subscribe to this list here.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(15) |
Oct
(115) |
Nov
(154) |
Dec
(258) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(377) |
Feb
(260) |
Mar
(249) |
Apr
(188) |
May
(152) |
Jun
(150) |
Jul
(195) |
Aug
(202) |
Sep
(200) |
Oct
(286) |
Nov
(242) |
Dec
(165) |
| 2002 |
Jan
(245) |
Feb
(241) |
Mar
(239) |
Apr
(346) |
May
(406) |
Jun
(369) |
Jul
(418) |
Aug
(357) |
Sep
(362) |
Oct
(597) |
Nov
(455) |
Dec
(344) |
| 2003 |
Jan
(446) |
Feb
(397) |
Mar
(515) |
Apr
(524) |
May
(377) |
Jun
(387) |
Jul
(532) |
Aug
(364) |
Sep
(294) |
Oct
(352) |
Nov
(295) |
Dec
(327) |
| 2004 |
Jan
(416) |
Feb
(318) |
Mar
(324) |
Apr
(249) |
May
(259) |
Jun
(218) |
Jul
(212) |
Aug
(259) |
Sep
(158) |
Oct
(162) |
Nov
(214) |
Dec
(169) |
| 2005 |
Jan
(111) |
Feb
(165) |
Mar
(199) |
Apr
(147) |
May
(131) |
Jun
(163) |
Jul
(235) |
Aug
(136) |
Sep
(84) |
Oct
(88) |
Nov
(113) |
Dec
(100) |
| 2006 |
Jan
(85) |
Feb
(119) |
Mar
(33) |
Apr
(31) |
May
(56) |
Jun
(68) |
Jul
(18) |
Aug
(62) |
Sep
(33) |
Oct
(55) |
Nov
(19) |
Dec
(40) |
| 2007 |
Jan
(22) |
Feb
(49) |
Mar
(34) |
Apr
(51) |
May
(66) |
Jun
(43) |
Jul
(116) |
Aug
(57) |
Sep
(70) |
Oct
(69) |
Nov
(97) |
Dec
(86) |
| 2008 |
Jan
(32) |
Feb
(47) |
Mar
(106) |
Apr
(67) |
May
(28) |
Jun
(39) |
Jul
(31) |
Aug
(25) |
Sep
(18) |
Oct
(25) |
Nov
(5) |
Dec
(21) |
| 2009 |
Jan
(33) |
Feb
(27) |
Mar
(27) |
Apr
(22) |
May
(22) |
Jun
(10) |
Jul
(17) |
Aug
(9) |
Sep
(21) |
Oct
(13) |
Nov
(4) |
Dec
(11) |
| 2010 |
Jan
(10) |
Feb
(8) |
Mar
(4) |
Apr
(1) |
May
|
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(8) |
Oct
(26) |
Nov
(9) |
Dec
(1) |
| 2011 |
Jan
(21) |
Feb
(16) |
Mar
(4) |
Apr
(19) |
May
(26) |
Jun
(9) |
Jul
(6) |
Aug
|
Sep
(4) |
Oct
(3) |
Nov
(2) |
Dec
(1) |
| 2012 |
Jan
(4) |
Feb
(7) |
Mar
(4) |
Apr
|
May
(1) |
Jun
(10) |
Jul
(1) |
Aug
(1) |
Sep
(18) |
Oct
(3) |
Nov
(1) |
Dec
(1) |
| 2013 |
Jan
(4) |
Feb
(2) |
Mar
(15) |
Apr
(6) |
May
(1) |
Jun
(3) |
Jul
(1) |
Aug
(2) |
Sep
(4) |
Oct
|
Nov
(9) |
Dec
|
| 2014 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
(4) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
(4) |
| 2015 |
Jan
(2) |
Feb
(3) |
Mar
(1) |
Apr
(2) |
May
(1) |
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(2) |
Oct
(9) |
Nov
(35) |
Dec
(6) |
| 2016 |
Jan
(7) |
Feb
(10) |
Mar
(10) |
Apr
(9) |
May
(13) |
Jun
(9) |
Jul
(1) |
Aug
(3) |
Sep
(3) |
Oct
(1) |
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
(1) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Paul S. <Ps...@le...> - 2002-03-10 18:44:31
|
Thanks Jason for the suggestions. I did try the for statement with various combinations, using "--", = "-=3D", greater and less then but it still never enters the loop, it = does set i to the value of filesize and even using size(), it only = initialises i and then skips the loop. I have tried to run a simple loop that steps from X to zero but this = never enters the loop either I keep playing around with and thanks again . Paul Stone |
|
From: carlos D. M. <cg...@wo...> - 2002-03-10 16:18:23
|
Perhaps you didn't check the option compile for win32 (no console) in the compiler options. For a couple of other messages I read it seems a frequent error. |
|
From: Jason H. <jas...@bt...> - 2002-03-10 14:37:34
|
You can choose to manipulate the values as strings, reversing the string and converting it to an integer to perform the addtion. You may need to write your own conversion function as I'm not sure if C/C++ has a standard one for differing bases (radix). You can then convert back to a string (in the same base) and perform the manipulation again until you get something like normal == reverse? Another way is to make an array with an integer for each digit. That way you can can just calculate the exponent for each possition according to it's base, doing it forward and backward, and then break the result back down into individual digits. i.e. 19 = 1 * 10^2 + 9 * 10^1 91 = 9 * 10^2 + 1 * 10^1 and 110 / 10^0 % 10 = 0 110 / 10^1 % 10 = 1 110 / 10^2 % 10 = 1 which are the individual digits of 110 etc... It seems more complicated, but may be easier than writing your own conversion from string to base 12 (or whatever) and back. I may do more work later. Jason. PS: You may want to check my math as I just did it quickly, and it could be done better. PPS: '^' represents 'raised to the power of', but doesn't exist in C/C++, and % is the modulus operator. ----- Original Message ----- From: "chromatonus 712" <chr...@ho...> To: <dev...@li...> Sent: Saturday, March 09, 2002 2:10 AM Subject: [Dev-C++] palindrome base prgm > > hi, I am writing a prgm that takes a number (like 19), and its base, (10 in > this case), and perform the following operation until a palindrome is > obtained: > > add the reverse of 19 > 19+91 = 110 > add the reverse of 110 > 110 + 11 = 121....a palindrome, > and the prgm should print out the 121. > > I think there are several caveats: > bases can range from 10 to 16, so the A,B,C,D,E,F is tricky to handle as > numbers, because the input would be like A32 for example. > And how to reverse the number and check to see if it's a palindrome, and > also doing addition in different bases. Any tip on these will be greatly > appreciated! > > > _________________________________________________________________ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. > > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: Jason H. <jas...@bt...> - 2002-03-10 14:21:55
|
A quick note. The C++ equivalent of sscanf and sprintf is the 'stringstream' class and it's related classes (istringstream, and ostringstream). Note that 'stringstream' is the current standard name, but previously it was known as 'strstream'. Once you have created the buffer you can operate on it in much the same way as with cout and cin (using << and >>). It's header is <sstream> (I think?). Jason. ----- Original Message ----- From: "Ioannis Vranos" <no...@ya...> To: "Dev-C++" <dev...@li...> Sent: Saturday, March 09, 2002 3:31 PM Subject: RE: [Dev-C++] palindrome base prgm I am still studying C++ so i do not know if it provides some else string to number facility, i so for the conversion i should suggest sscanf() on string::c_str(). Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.d2g.com * Alternative URL: http://run.to/noicys _______________________________________________ Dev-cpp-users mailing list Dev...@li... https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: Jason H. <jas...@bt...> - 2002-03-10 14:13:08
|
Using C style for loops isn't as easy as the more traditional =
FOR..TO..DO.. or FOR..TO..STEP..DO.. style of loops. The basic C for =
loop is constructed:
for(initialiser; condition; change) { ...do... }
I won't go into detail, but the main thing you have to remember is that =
the condition should remain true until the ending condition is met. If =
the condition isn't true to start with then the loop won't go. In you =
loop you have:
// Add line numbers:
for(int i =3D filesize; i < 0; i - 1)
cout << i << ": " << v[i] << endl;
Assuming filesize is some positive integer then, you are in effect =
trying to see if filesize is smaller-than zero, which it won't be, and =
so the condition evaluates to false and no loop takes place. Another =
error in you code is the change section, where you are trying to count =
down on i with: i - 1; however in C/C++ this is not a complete statement =
(not technically true, but you know what I mean). What you probably =
meant is i-- (or --i, doesn't matter in this case). The post- and pre- =
increment and decrement operators are fairly unique in C/C++ in that =
they modifiy the value that you are working with as well as returning a =
result. Normally in most statements when you perform a calculation you =
need to assign the result of the calculation to something, another =
variable. Your statment calculates i - 1, but then discards the value. =
What you may have wanted was i =3D i - 1; where you reassign the value =
back into itself with the change. Equivalent is i -=3D 1; or as noted =
i--;
So what you actualy want is:
for(int i =3D filesize; i > 0; i--)
As for the validity of doing it in that way I'll leave it up to you, but =
here are some more observations I have made.
It is important to ensure that you are using the right comparison and =
start values (hint!). In this version we counted down from filesize to =
1. In an array you have to remember that the first element starts at 0 =
and goes up to its length - 1, in fact the vector class has a member =
function 'size()' which will return the value you are calculating in =
filesize.
A common error in coding like this is to overrun or underrun a loop by =
1, and it is hard to notice when you have as errors caused by this =
aren't normally catastrophic, but subtle and hard to trace.
Also I notice that the for loop you are using would print the contents =
of the array in reverse. It is more common to want to walk forward =
through an array, but it depends on the situation, for forward you could =
use:
for(int i =3D 0; i < v.size(); i++)....
The code you supplied appears to have a few syntax errors in it, so I =
assume the code you have been using isn't exactly the same. The while =
block is missing its closing bracket '}', and the 'filesize' variable is =
never declared i.e. int filesize =3D 0; There may be others.
Hope this helps, Jason.
----- Original Message -----=20
From: Paul Stone=20
To: dev...@li...=20
Sent: Sunday, March 10, 2002 1:25 AM
Subject: [Dev-C++] Problems with a for loop
Greetings,
Iam trying to complete the tutoils from tinking C++, chapter 2 and =
seam to be having a problem with a for loop couting down.=20
The program is meant to read a file and display it starting with the =
last line of the file, it reads the file ok and copies it to an array =
but when it gets to the for loop it just skips over it,=20
I have tried changing the values in the for statement but the loop is =
still never enterd and it works if the loop counts up from zero to the =
size of the fileCan anyone help?=20
Code listed below:
//Backvector.cpp
//Copy the lines of a file into an array and
// diplay then starting with the last line.
#include <cstdlib>
#include <string>
#include <iostream>
#include <fstream>
#include <vector>
using namespace std;
int main(int argc, char *argv[])
{
vector<string> v;
ifstream in("Backvector.cpp");
string line;
while(getline(in, line)) {
v.push_back(line); // Add the line to the end
filesize++; // Get number of lines in file
// Add line numbers:
for(int i =3D filesize; i < 0; i - 1)
cout << i << ": " << v[i] << endl;
system("PAUSE");
return 0;
} ///:~
Thanks for any help
Paul Stone
|
|
From: <Dan...@ao...> - 2002-03-10 03:04:06
|
Flavio de Souza writes:
>In a message dated 3/9/2002 5:24:11 PM Central Standard Time, >
fla...@ne... writes:
> >DEFPUSHBUTTON "&OK",IDOK,174,18,50,14
> > PUSHBUTTON "&Cancel",IDCANCEL,174,35,50,14
> > GROUPBOX "About this program...",IDC_STATIC,7,7,225,52
> > CTEXT "An example program showing how to use Dialog >
> Boxes\r\n\r\nby theForger",
> >
The only parse error I see is that you didn't enclose each line that had a "
in it. with an opposing one. This may help solve you problem:
DEFPUSHBUTTON "&OK",IDOK,174,18,50,14"
PUSHBUTTON "&Cancel",IDCANCEL,174,35,50,14"
GROUPBOX "About this program...",IDC_STATIC,7,7,225,52"
CTEXT "An example program showing how to use Dialog >
Boxes\r\n\r\nby
theForger",IDC_STATIC,16,18,144,33
Hopefully this will help solve your parse error.
Danny
|
|
From: Paul S. <Ps...@le...> - 2002-03-10 01:23:40
|
Greetings,
Iam trying to complete the tutoils from tinking C++, chapter 2 and seam =
to be having a problem with a for loop couting down.=20
The program is meant to read a file and display it starting with the =
last line of the file, it reads the file ok and copies it to an array =
but when it gets to the for loop it just skips over it,=20
I have tried changing the values in the for statement but the loop is =
still never enterd and it works if the loop counts up from zero to the =
size of the fileCan anyone help?=20
Code listed below:
//Backvector.cpp
//Copy the lines of a file into an array and
// diplay then starting with the last line.
#include <cstdlib>
#include <string>
#include <iostream>
#include <fstream>
#include <vector>
using namespace std;
int main(int argc, char *argv[])
{
vector<string> v;
ifstream in("Backvector.cpp");
string line;
while(getline(in, line)) {
v.push_back(line); // Add the line to the end
filesize++; // Get number of lines in file
// Add line numbers:
for(int i =3D filesize; i < 0; i - 1)
cout << i << ": " << v[i] << endl;
system("PAUSE");
return 0;
} ///:~
Thanks for any help
Paul Stone
|
|
From: Jason H. <jas...@bt...> - 2002-03-10 00:19:50
|
Hi,
When I ran your code I didn't get an infinite loop and it appeared to
terminate without any problems, but after a little work I did find a few
potential problems. Some are to do with memory allocation and deallocation,
which you still haven't mastered. However the mistake that could be the
cause of your problem is that you aren't using counter. When you count off
until your next victim in the for loop you are looping to 'number' when it
should be 'counter'.
As is my habit I have rewritten what you gave me and come up with something
that I believe is neater (attached). Pay particular attention to the
handling of the pointers, and note also that I don't use any references or
redundant pointers (i.e. one and two) cos they aren't needed. You may want
them though, so it's up to you.
Hope this helps, Jason.
----- Original Message -----
From: "chromatonus 712" <chr...@ho...>
To: <dev...@li...>
Sent: Saturday, March 09, 2002 1:47 AM
Subject: [Dev-C++] circular linked list
> Hi, this is kind of like a game where everyone sits in a circle and
starting
> from one person, count off by 5's for example, eliminating every 5th
person
> until there is one person left.
> there are 2 inputs for this program, one the # of elements in the circular
> list, two the # to count off by.
> My program runs in an infinite loop and I don't know why... Thanks for
your
> help!
>
> #include <iostream.h>
> #include <stdlib.h>
> #include <conio.h>
>
>
> struct node
> {
> char data;
> node *next;
> };
>
> //PROTOTYPES
>
> void add(node *&, char);
>
> node delete_from(node *&, node *, node *);
>
> //MAIN PROGRAM
>
> int main()
> {
> int i, number, counter;
> node *ring = new node;
> node *back = new node;
> node *track = new node;
> cout<< "# of victims in the circle = ";
> cin>> number;
> cout<< "count by how many? ";
> cin>> counter;
> ring -> next = ring;
> ring -> data = 'a';
> for(i=1; i<number; i++)
> add(ring, char(97+i));
> back = ring;
> for(i=1; i<=number; i++)
> back = back -> next;
> if(back -> next == ring)
> cout<< " yers";
> cout<< ring->data;
> while(ring -> next != ring)
> {
> for(i=1; i<=number; i++)
> back = back -> next;
> track = back -> next;
> delete_from(ring, back, track);
> ring = back;
> system("PAUSE");
> }
> cout<< "Survivor is " << ring -> data << "\n";
> system("PAUSE");
> }
>
> void add(node *&list, char info)
> {
> node *addon = new node;
> addon -> data = info;
> addon -> next = list -> next;
> list -> next = addon;
> }
>
> node delete_from(node *&list, node *one, node *two)
> {
> cout<< two -> data << " ";
> one -> next = two -> next;
> return *two;
> }
>
>
>
> _________________________________________________________________
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
>
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|
|
From: Flavio de S. <fla...@ne...> - 2002-03-09 23:22:58
|
I am trying to create a new diaolog window by I always got this error:
C:\DEV-C_~1\BIN\windres: C:\\MEUSDO~1\\PROJETOS\\WINDOW~1\\RSRC.RC:21: parse error
The code is:
IDD_ABOUT DIALOG DISCARDABLE 0, 0, 239, 66
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "My About Box"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "&OK",IDOK,174,18,50,14
PUSHBUTTON "&Cancel",IDCANCEL,174,35,50,14
GROUPBOX "About this program...",IDC_STATIC,7,7,225,52
CTEXT "An example program showing how to use Dialog Boxes\r\n\r\nby theForger",
IDC_STATIC,16,18,144,33
END
The line that is getting the error is where "STYLE" is written.
I tried to use the rresource editor and I got the same error. Is it a bug?
Please, help
Flavio de Souza
fla...@ne...
ICQ:78458203
Sertãozinho - SP
" Fazendo o que está ao nosso alcance, beneficiamos a todos.
Tentando apenas ter idéias para salvar o mundo, não ajudamos
nem a nós mesmos."
|
|
From: Ioannis V. <no...@ya...> - 2002-03-09 15:32:02
|
> -----Original Message----- > From: dev...@li...=20 > [mailto:dev...@li...] On Behalf=20 > Of chromatonus 712 > Sent: Saturday, March 09, 2002 4:10 AM > To: dev...@li... > Subject: [Dev-C++] palindrome base prgm >=20 >=20 >=20 > hi, I am writing a prgm that takes a number (like 19), and=20 > its base, (10 in=20 > this case), and perform the following operation until a palindrome is=20 > obtained: >=20 > add the reverse of 19 > 19+91 =3D 110 > add the reverse of 110 > 110 + 11 =3D 121....a palindrome, > and the prgm should print out the 121. >=20 > I think there are several caveats: > bases can range from 10 to 16, so the A,B,C,D,E,F is tricky=20 > to handle as=20 > numbers, because the input would be like A32 for example. > And how to reverse the number and check to see if it's a=20 > palindrome, and=20 > also doing addition in different bases. Any tip on these will=20 > be greatly=20 > appreciated! Get the number as a string, check it and reverse it and then convert it to number. I am still studying C++ so i do not know if it provides some else string to number facility, i so for the conversion i should suggest sscanf() on string::c_str(). Ioannis =20 * Ioannis Vranos * Programming pages: http://www.noicys.d2g.com * Alternative URL: http://run.to/noicys |
|
From: chromatonus 7. <chr...@ho...> - 2002-03-09 02:10:42
|
hi, I am writing a prgm that takes a number (like 19), and its base, (10 in this case), and perform the following operation until a palindrome is obtained: add the reverse of 19 19+91 = 110 add the reverse of 110 110 + 11 = 121....a palindrome, and the prgm should print out the 121. I think there are several caveats: bases can range from 10 to 16, so the A,B,C,D,E,F is tricky to handle as numbers, because the input would be like A32 for example. And how to reverse the number and check to see if it's a palindrome, and also doing addition in different bases. Any tip on these will be greatly appreciated! _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. |
|
From: chromatonus 7. <chr...@ho...> - 2002-03-09 01:48:03
|
Hi, this is kind of like a game where everyone sits in a circle and starting
from one person, count off by 5's for example, eliminating every 5th person
until there is one person left.
there are 2 inputs for this program, one the # of elements in the circular
list, two the # to count off by.
My program runs in an infinite loop and I don't know why... Thanks for your
help!
#include <iostream.h>
#include <stdlib.h>
#include <conio.h>
struct node
{
char data;
node *next;
};
//PROTOTYPES
void add(node *&, char);
node delete_from(node *&, node *, node *);
//MAIN PROGRAM
int main()
{
int i, number, counter;
node *ring = new node;
node *back = new node;
node *track = new node;
cout<< "# of victims in the circle = ";
cin>> number;
cout<< "count by how many? ";
cin>> counter;
ring -> next = ring;
ring -> data = 'a';
for(i=1; i<number; i++)
add(ring, char(97+i));
back = ring;
for(i=1; i<=number; i++)
back = back -> next;
if(back -> next == ring)
cout<< " yers";
cout<< ring->data;
while(ring -> next != ring)
{
for(i=1; i<=number; i++)
back = back -> next;
track = back -> next;
delete_from(ring, back, track);
ring = back;
system("PAUSE");
}
cout<< "Survivor is " << ring -> data << "\n";
system("PAUSE");
}
void add(node *&list, char info)
{
node *addon = new node;
addon -> data = info;
addon -> next = list -> next;
list -> next = addon;
}
node delete_from(node *&list, node *one, node *two)
{
cout<< two -> data << " ";
one -> next = two -> next;
return *two;
}
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com
|
|
From: Brian M. <str...@ho...> - 2002-03-08 20:35:48
|
Wow. For someone who is new to programming, you sure can pound out some
serious code. I think the biggest problem you have with this program is
that the algorithm is too complex (i'm not exactly sure what algorithm it is
you are working with, it just seems self-evident). There is a trick to the
knight's tour quandary that lends itself to a very simple algorithm.
The sure-fire way (has not failed my yet) to make it through the Knight's
Tour completely without getting stuck is to always move to one of the spaces
(out of a max of 8) which has the lowest "escape value." A square's escape
value is simply the number of squares that the knight can legally move from
after landing on that square. Here is an example of all the escape values
on the board for the first few moves of the knight's tour:
2 3 4 4 4 4 3 2
3 4 6 6 6 6 4 3
4 6 8 8 8 8 6 4
4 6 8 8 8 8 6 4
4 6 8 8 8 8 6 4
4 6 8 8 8 8 6 4
3 4 6 6 6 6 4 3
2 3 4 4 4 4 3 2
2 3 3 4 3 4 3 2
3 3 6 6 6 5 4 3
4 6 8 K 8 8 6 4
4 5 8 8 8 7 6 4
4 6 7 8 7 8 6 4
4 6 8 8 8 8 6 4
3 4 6 6 6 6 4 3
2 3 4 4 4 4 3 2
2 3 K 4 3 4 3 2
2 3 6 6 5 5 4 3
4 5 8 X 8 8 6 4
4 5 8 8 8 7 6 4
4 6 7 8 7 8 6 4
4 6 8 8 8 8 6 4
3 4 6 6 6 6 4 3
2 3 4 4 4 4 3 2
2 3 X 4 3 4 3 2
K 3 6 6 5 5 4 3
4 5 7 X 8 8 6 4
4 4 8 8 8 7 6 4
4 6 7 8 7 8 6 4
4 6 8 8 8 8 6 4
3 4 6 6 6 6 4 3
2 3 4 4 4 4 3 2
2 3 X 4 3 4 3 2
X 3 5 6 5 5 4 3
4 5 7 X 8 8 6 4
4 K 8 8 8 7 6 4
4 6 7 7 7 8 6 4
3 6 7 8 8 8 6 4
3 4 6 6 6 6 4 3
2 3 4 4 4 4 3 2
If you keep moving the knight accross the board in this manner, going to the
square with the lowest escape value, you will eventually complete the
knights tour.
So, the algorithm for the knights tour is simply:
while the knight's tour is not complete:
find all next possible squares to move to
find the square with the lowest "escape value"
move there
loop
Don't ask me why this works, i just know it does.
>From: "Mohammed Riyaz" <p_m...@ho...>
>To: dev...@li...
>Subject: [Dev-C++] reg-Knight's tour problem
>Date: Thu, 07 Mar 2002 12:00:22 +0000
>
>hey,
>I had a look at the code sent in. Am new to programming, my code sux when
>compared to that. :D .If any one of you cud fix this code ,help me
>out.
>-Riyaz
>
>#include <iostream.h>
>#include <stdlib.h>
>#include <process.h>
>class knight
> {
> int chess[8][8],location[65][10],denied[64];
> int row_loc,pos,i,j;
> public:
> knight();
> void assignment(void);
> int value(int);
> void refresh(void);
> int append(int ,int);
> };
>knight::knight(void)
> {
> row_loc=-1;
> i=j=0;
> for(int m=0;m<8;m++)
> for(int n=0;n<8;n++)
> chess[m][n]=0;
> for(int m=0;m<65;m++)
> for(int n=0;n<10;n++)
> location[m][n]=0;
> for(int m=0;m<64;m++)
> denied[m]=99;
> assignment();
> }
>void knight::assignment(void)
> {
> chess[i][j]=1;
> refresh();
> pos=value(j+(8*i));
> i=pos/8;
> j=pos%8;
> assignment();
> }
>int knight::value(int val)
> {
> row_loc++;
> int temp=1;
> int lock,ii,jj;
> location[row_loc][0]=val;
> ii=val/8;
> jj=val%8;
> if(jj==0)
> {
> if(ii>=1)
> {
> if(ii>=2)
> {lock=append(val-15,temp);if(lock==0) {temp++;}}
> lock=append(val-6,temp);if(lock==0) {temp++;}
> }
> if(ii<=6)
> {
> if(ii<=5)
> {lock=append(val+17,temp);if(lock==0) {temp++;}}
> lock=append(val+10,temp);if(lock==0) {temp++;}
> }
> }
> if(jj==7)
> {
> if(ii>=1)
> {
> if(ii>=2)
> {lock=append(val-17,temp);if(lock==0) {temp++;}}
> lock=append(val-10,temp);if(lock==0) {temp++;}
> }
> if(ii<=6)
> {
> if(ii<=5)
> {lock=append(val+15,temp);if(lock==0) {temp++;}}
> lock=append(val+6,temp);if(lock==0) {temp++;}
> }
> }
> if(jj==1)
> {
> if(ii>=1)
> {
> if(ii>=2)
> {
> lock=append(val-15,temp);if(lock==0) {temp++;}
> lock=append(val-17,temp);if(lock==0) {temp++;}
> }
> lock=append(val-6,temp);if(lock==0) {temp++;}
> }
> if(ii<=6)
> {
> if(ii<=5)
> {
> lock=append(val+17,temp);if(lock==0) {temp++;}
> lock=append(val+15,temp);if(lock==0) {temp++;}
> }
> lock=append(val+10,temp);if(lock==0) {temp++;}
> }
> }
> if(jj==6)
> {
> if(ii>=1)
> {
> if(ii>=2)
> {
> lock=append(val-15,temp);if(lock==0) {temp++;}
> lock=append(val-17,temp);if(lock==0) {temp++;}
> }
> lock=append(val-10,temp);if(lock==0) {temp++;}
> }
> if(ii<=6)
> {
> if(ii<=5)
> {
> lock=append(val+17,temp);if(lock==0) {temp++;}
> lock=append(val+15,temp);if(lock==0) {temp++;}
> }
> lock=append(val+6,temp);if(lock==0) {temp++;}
> }
> }
> if(jj>1 && jj<6)
> {
> if(ii>=1)
> {
> if(ii>=2)
> {
> lock=append(val-17,temp);if(lock==0) {temp++;}
> lock=append(val-15,temp);if(lock==0) {temp++;}
> }
> lock=append(val-10,temp);if(lock==0) {temp++;}
> lock=append(val-6,temp);if(lock==0) {temp++;}
> }
> if(ii<=6)
> {
> if(ii<=5)
> {
> lock=append(val+15,temp);if(lock==0) {temp++;}
> lock=append(val+17,temp);if(lock==0) {temp++;}
> }
> lock=append(val+6,temp);if(lock==0) {temp++;}
> lock=append(val+10,temp);if(lock==0) {temp++;}
> }
> }
> lock=append(-1,temp);
> code:
> if(location[row_loc][1]==-1)
> {
> ii=location[row_loc][0]/8;
> jj=location[row_loc][0]%8;
> chess[ii][jj]=0;
> row_loc--;
> if(row_loc<0) {cout<<"NO SOLUTION";system("pause");exit(0);}
> for(int m=1;m<9;m++)
> location[row_loc][m]=location[row_loc][m+1];
> goto code;
> }
> return location[row_loc][1];
> }
>void knight::refresh(void)
> {
> int l,tot;
> l=tot=0;
> for(int m=0;m<64;m++)
> denied[m]=99;
> for(int m=0;m<8;m++)
> {
> for(int n=0;n<8;n++)
> {
> if(chess[m][n]==1)
> {
> if(l==63)
> {
> cout<<"RESULT :"<<endl;
> for(int k=0;k<64;k++)
> cout<<denied[k]<<" ";
> system("pause");
> }
> tot=n+(8*m);
> denied[l]=tot;
> l++;
> }
> }
> }
> }
>int knight::append(int val1,int temp1)
> {
> int lock=0;
> for(int m=0;m<64;m++)
> if(denied[m]==val1)
> {lock=1;break;}
> if(!lock)
> location[row_loc][temp1]=val1;
> return lock;
> }
>void main()
> {knight k;}
>
>
>
>_________________________________________________________________
>MSN Photos is the easiest way to share and print your photos:
>http://photos.msn.com/support/worldwide.aspx
>
>
>_______________________________________________
>Dev-cpp-users mailing list
>Dev...@li...
>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
|
|
From: <Ech...@ne...> - 2002-03-08 16:19:05
|
Message: 8
From: "Ioannis Vranos" <no...@ya...>
To: "Dev-C++" <dev...@li...>
Subject: RE: [Dev-C++] reg-Knight's tour problem
Date: Thu, 7 Mar 2002 15:20:47 +0200
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...] On Behalf
> Of Mohammed Riyaz
> Sent: Thursday, March 07, 2002 2:00 PM
> To: dev...@li...
> Subject: [Dev-C++] reg-Knight's tour problem
>
>
> hey,
> I had a look at the code sent in. Am new to programming, my
> code sux when
> compared to that. :D .If any one of you cud fix this code
> ,help me out. -Riyaz
>
> #include <iostream.h>
> #include <stdlib.h>
Useless
> #include <process.h>
Pre-ANSI header file declaration
> class knight
> {
> int chess[8][8],location[65][10],denied[64];
> int row_loc,pos,i,j;
> public:
> knight();
> void assignment(void);
> int value(int);
> void refresh(void);
> int append(int ,int);
> };
> knight::knight(void)
> {
> row_loc=-1;
> i=j=0;
> for(int m=0;m<8;m++)
> for(int n=0;n<8;n++)
> chess[m][n]=0;
> for(int m=0;m<65;m++)
> for(int n=0;n<10;n++)
> location[m][n]=0;
> for(int m=0;m<64;m++)
> denied[m]=99;
> assignment();
> }
> void knight::assignment(void)
> {
> chess[i][j]=1;
Where are i, j defined? Strangely it compiles in MINGW32!!!! (compiler
defect).
i, j are defined in class knight:
class knight{
int chess[8][8],location[65][10],denied[64];
int row_loc,pos,i,j; <-- HERE
public:
knight();
void assignment(void);
int value(int);
void refresh(void);
int append(int ,int);
};
> refresh();
> pos=value(j+(8*i));
> i=pos/8;
> j=pos%8;
> assignment();
// Recursion never ends!
Since it is tail recursion it could be done in a while loop - once you figure out the exit condition ... while(1) is not good either.
> }
> int knight::value(int val)
> {
> row_loc++;
> int temp=1;
> int lock,ii,jj;
> location[row_loc][0]=val;
> ii=val/8;
> jj=val%8;
> if(jj==0)
> {
> if(ii>=1)
> {
> if(ii>=2)
> {lock=append(val-15,temp);if(lock==0) {temp++;}}
> lock=append(val-6,temp);if(lock==0) {temp++;}
> }
> if(ii<=6)
> {
> if(ii<=5)
> {lock=append(val+17,temp);if(lock==0) {temp++;}}
> lock=append(val+10,temp);if(lock==0) {temp++;}
> }
> }
> if(jj==7)
> {
> if(ii>=1)
> {
> if(ii>=2)
> {lock=append(val-17,temp);if(lock==0) {temp++;}}
> lock=append(val-10,temp);if(lock==0) {temp++;}
> }
> if(ii<=6)
> {
> if(ii<=5)
> {lock=append(val+15,temp);if(lock==0) {temp++;}}
> lock=append(val+6,temp);if(lock==0) {temp++;}
> }
> }
> if(jj==1)
> {
> if(ii>=1)
> {
> if(ii>=2)
> {
> lock=append(val-15,temp);if(lock==0) {temp++;}
> lock=append(val-17,temp);if(lock==0) {temp++;}
> }
> lock=append(val-6,temp);if(lock==0) {temp++;}
> }
> if(ii<=6)
> {
> if(ii<=5)
> {
> lock=append(val+17,temp);if(lock==0) {temp++;}
> lock=append(val+15,temp);if(lock==0) {temp++;}
> }
> lock=append(val+10,temp);if(lock==0) {temp++;}
> }
> }
> if(jj==6)
> {
> if(ii>=1)
> {
> if(ii>=2)
> {
> lock=append(val-15,temp);if(lock==0) {temp++;}
> lock=append(val-17,temp);if(lock==0) {temp++;}
> }
> lock=append(val-10,temp);if(lock==0) {temp++;}
> }
> if(ii<=6)
> {
> if(ii<=5)
> {
> lock=append(val+17,temp);if(lock==0) {temp++;}
> lock=append(val+15,temp);if(lock==0) {temp++;}
> }
> lock=append(val+6,temp);if(lock==0) {temp++;}
> }
> }
> if(jj>1 && jj<6)
> {
> if(ii>=1)
> {
> if(ii>=2)
> {
> lock=append(val-17,temp);if(lock==0) {temp++;}
> lock=append(val-15,temp);if(lock==0) {temp++;}
> }
> lock=append(val-10,temp);if(lock==0) {temp++;}
> lock=append(val-6,temp);if(lock==0) {temp++;}
> }
> if(ii<=6)
> {
> if(ii<=5)
> {
> lock=append(val+15,temp);if(lock==0) {temp++;}
> lock=append(val+17,temp);if(lock==0) {temp++;}
> }
> lock=append(val+6,temp);if(lock==0) {temp++;}
> lock=append(val+10,temp);if(lock==0) {temp++;}
> }
> }
> lock=append(-1,temp);
> code:
> if(location[row_loc][1]==-1)
> {
> ii=location[row_loc][0]/8;
> jj=location[row_loc][0]%8;
> chess[ii][jj]=0;
> row_loc--;
> if(row_loc<0) {cout<<"NO
> SOLUTION";system("pause");exit(0);}
> for(int m=1;m<9;m++)
> location[row_loc][m]=location[row_loc][m+1];
> goto code;
> }
> return location[row_loc][1];
> }
> void knight::refresh(void)
> {
> int l,tot;
> l=tot=0;
> for(int m=0;m<64;m++)
> denied[m]=99;
> for(int m=0;m<8;m++)
> {
> for(int n=0;n<8;n++)
> {
> if(chess[m][n]==1)
> {
> if(l==63)
> {
> cout<<"RESULT :"<<endl;
> for(int k=0;k<64;k++)
> cout<<denied[k]<<" ";
> system("pause");
> }
> tot=n+(8*m);
> denied[l]=tot;
> l++;
> }
> }
> }
> }
> int knight::append(int val1,int temp1)
> {
> int lock=0;
> for(int m=0;m<64;m++)
> if(denied[m]==val1)
> {lock=1;break;}
> if(!lock)
> location[row_loc][temp1]=val1;
> return lock;
> }
> void main()
> {knight k;}
int main()
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.d2g.com
* Alternative URL: http://run.to/noicys
Evan Hempel
--
__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/
Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/
|
|
From: carlos D. M. <cg...@wo...> - 2002-03-08 12:02:06
|
Sincerely, I prefer HTML and plain text, is as I send messages. When I send only plain I receive the message individually as when html, but the paragraphs are written in only a line, and I have to use the horizontal scroll bar, which is somehow annoying for me. Another reason is that with individual messages (in nestcape, which is what I use) if I try to delete the pieces of the message I am not interested in (this is not bad using of 'in'?), it doesn't delete it, it deletes all the message to the trash, so if I want store one of the messages I must store all the others, and if I am interested in many like that it lead to a wasting of memory, and uncomfort for search the message I want read again. With this format, messages come individually, I can see what message is the one I want read again (perhaps if the amount become big I again need search the same as with all messages together, so then it's not a difference), and I can store only the messages I am interested in, and delete all the otherssaving some memory. |
|
From: Ioannis V. <no...@ya...> - 2002-03-08 09:55:43
|
I saw that even with html it is easily to read them since they are separated in message 1, message 2, e.t.c. sections. Or am i wrong? Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.d2g.com * Alternative URL: http://run.to/noicys > -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of Jonathan Thomas > Sent: Friday, March 08, 2002 5:08 AM > To: dev...@li... > Subject: [Dev-C++] Clarification on HTML and digest formats > > > Dear all, > Just to help those who don't understand about the > HTML/NonHTML issue, and about digest formats. A digest > format is where the list server bundles up a bunch of > messages sent to the list, and then sends this bunch of > emails as *one* complete email to my inbox. This saves > having my mailbox overflowed with many individual messages, > and also gives a quick way to scan what topics are covered, > to see if there are any interesting mails to read. The list > server sends a bunch of emails whenever it feels it has > enough emails to send (haven't worked out the paramters on > this particular one!). > > Below I have cut and pasted a *complete* digest email I > received a little while back. Hopefully your email reader > hasn't tried to be super smart and render the HTML code > rather than just display it raw. This, as far as digests go, > is not too bad - many posts are in plain text. But yours, > Daniel Glenfield is actually in HTML funnily enough. > > Well hopefully you can see why it is so annoying. Please, > find the option in your email program that sets it to send > *plain-text* only, and use it! > > Thanks, > Jonathan. > > > P.S. Sorry to send this rather long email to those who > understand and observe the netiquette! > ------------------------------------------------------- |
|
From: Jason H. <jas...@bt...> - 2002-03-08 03:47:08
|
When I first started getting this list I used the digest format, but had a
similar problem so I switched to individual mails. I think that when the
digest is made it tends to mangle the text in HTML messages and makes it so
the e-mail browser can't read it properly.
If you are willing to go to the individual format then you can get Outlook
(assuming that's what you use?) to redirect the mail to a different folder
that you can set up, by using a message rule. Just create a rule that says
something like:
Apply this rule after the message arrives
Where the To line contains 'dev...@li...' or
'dev...@so...'
or Where the CC line contains 'dev...@li...' or
'dev...@so...'
Move it to the Dev-C++ folder
... which is what I use.
This is a useful technique for anyone who recieves a lot of mail they have
subscribed to, i.e. I also get ZDNet newsletters, IBM developer works stuff,
etc... and it all automatically goes to it's own folder in outlook. I
imagine that most e-mail clients will have some ability for applying rules,
and they aren't just to get rid of spam.
Jason.
----- Original Message -----
From: "Jonathan Thomas" <jt...@it...>
To: <dev...@li...>
Sent: Friday, March 08, 2002 3:08 AM
Subject: [Dev-C++] Clarification on HTML and digest formats
> Dear all,
> Just to help those who don't understand about the HTML/NonHTML
issue, and about digest formats. A digest format is where the list server
bundles up a bunch of messages sent to the list, and then sends this bunch
of emails as *one* complete email to my inbox. This saves having my mailbox
overflowed with many individual messages, and also gives a quick way to scan
what topics are covered, to see if there are any interesting mails to read.
The list server sends a bunch of emails whenever it feels it has enough
emails to send (haven't worked out the paramters on this particular one!).
>
> Below I have cut and pasted a *complete* digest email I received a little
while back. Hopefully your email reader hasn't tried to be super smart and
render the HTML code rather than just display it raw. This, as far as
digests go, is not too bad - many posts are in plain text. But yours,
Daniel Glenfield is actually in HTML funnily enough.
>
> Well hopefully you can see why it is so annoying. Please, find the option
in your email program that sets it to send *plain-text* only, and use it!
>
> Thanks,
> Jonathan.
>
>
> P.S. Sorry to send this rather long email to those who understand and
observe the netiquette!
> -------------------------------------------------------
>
> Send Dev-cpp-users mailing list submissions to
> dev...@li...
<mailto:dev...@li...>
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
> or, via email, send a message with subject or body 'help' to
> dev...@li...
<mailto:dev...@li...>
>
> You can reach the person managing the list at
> dev...@li...
<mailto:dev...@li...>
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Dev-cpp-users digest..."
>
>
> Today's Topics:
>
> 1. RE: (no subject) (Ioannis Vranos)
> 2. Do Dev-C++4 support Texture Mapping? (Ope...@ao...
<mailto:Ope...@ao...>)
> 3. Re: Do Dev-C++4 support Texture Mapping? (Quentin Smith)
> 4. Re: What lang. to learn first. (Samuel Keding)
> 5. A suggestion (Jonathan & Brigitte)
> 6. help (Mohammed Riyaz)
> 7. RE: help (Ioannis Vranos)
> 8. Re: A suggestion (Daniel Glenfield)
> 9. Re: help (Jason Hardman)
>
> --__--__--
>
> Message: 1
> From: "Ioannis Vranos" <no...@ya...> <mailto:no...@ya...>
> To: "Dev-C++" <dev...@li...>
<mailto:dev...@li...>
> Subject: RE: [Dev-C++] (no subject)
> Date: Wed, 6 Mar 2002 02:09:28 +0200
>
> This is a multi-part message in MIME format.
>
> ------=_NextPart_000_0007_01C1C4B3.F2A479E0
> Content-Type: text/plain;
> charset="us-ascii"
> Content-Transfer-Encoding: quoted-printable
>
> -----Original Message-----
> From: dev...@li...
<mailto:dev...@li...>
> [mailto:dev...@li...] On Behalf Of
> h.r...@gm... <mailto:h.r...@gm...>
> Sent: Tuesday, March 05, 2002 11:19 PM
> To: Dev...@li...
<mailto:Dev...@li...>
> Subject: Re: [Dev-C++] (no subject)
>
>
>
> As you said "C++ provides all the paradigms and facilities both high
> level and low level,..." which I think is actualy a reason for not
> learning C++ straight off. Also is the fact that C++ is a hybrid
> language in that it can operate as both a structured language and an OOP
> language, or a bit of both. When learning an approach it's important
> that the learner is not confused by the features of a language, and is
> kept on a 'tight leash' so to say.
> =20
> Another thing that C and C++ does is to expose pointers and references
> more than most languages, as it is a middle level language. It would be
> better to start with high level language which doesn't confuse complete
> newbies with such things. I think pointers are one of the harder
> concepts that most learning programmers have to get thier heads around
> at some point, but not right at the beginning.
> =20
> =20
>
> In C++ there is no need to use pointers or references. For simple tasks
> you can use the provided facilities without bothering for low level
> stuff: vectors, strings, cin, cout, e.t.c.. If you need to use pointers
> then you are dealing with advanced concepts not being able to implement
> them with a simpler language anyway. Also there is no need to learn C!
>
> =20
> =20
> =20
> As for C++ being the *best* language, it's a matter of point of view,
> but I wouldn't say that any language is the best, much the same that any
> spoken language is the best. When approaching a development you choose
> the one that is right at the time. An additional benefit of learning
> Pascal (or some other language) is that you can write on your CV
> (Resume) that you can program in Pascal (or whatever). I believe that
> Cobol programmers are very much in demand these days.
> =20
> =20
>
> Knowing C i bought a Pascal book and learned it in 2 days. And this
> because C's abilities are a superset of Pascal abilities (after all the
> most Pascal compilers are written in C). After finishing with C++ i
> think i can learn any programming language of any of C++'s supported
> paradigms in the same time frame.
> =20
> =20
> C++ is not the "best language". It is the "best general purpose
> programming language". Or if you do not like this, it is the dominant
> general purpose programming language. [:)] According to IDC, in 2001
the
> 1st in use programming language was C++ & C (mainly C++), 2nd was Visual
> Basic and then the others.
> =20
> I do not underestimate the other languages and their followers but i am
> just saying the facts. After all if C++ wasn't the best i would not
> study it in the first place. I wasn't forced to learn C++, i chose to
> learn it after checking the facts.
> =20
> =20
> =20
> Ioannis
> =20
> * Ioannis Vranos
> * Programming pages: <http://www.noicys.d2g.com/>
> http://www.noicys.d2g.com
> * Alternative URL: <http://run.to/noicys> http://run.to/noicys
>
> ------=_NextPart_000_0007_01C1C4B3.F2A479E0
> Content-Type: text/html;
> charset="us-ascii"
> Content-Transfer-Encoding: quoted-printable
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
> charset=3Dus-ascii">
> <TITLE>Message</TITLE>
>
> <META content=3D"MSHTML 6.00.2713.1100" name=3DGENERATOR>
> <STYLE></STYLE>
> </HEAD>
> <BODY bgColor=3D#ffffff>
> <DIV><FONT face=3DTahoma size=3D2>-----Original =
> Message-----<BR><B>From:</B>=20
> dev...@li...=20
<mailto:dev...@li...=20>
> [mailto:dev...@li...] <B>On Behalf Of=20
> </B>h.r...@gm... <mailto:h.r...@gm...><BR><B>Sent:</B> Tuesday,
March 05, 2002 11:19=20
> PM<BR><B>To:</B> Dev...@li...
<mailto:Dev...@li...><BR><B>Subject:</B> =
> Re:=20
> [Dev-C++] (no subject)<BR><BR></FONT></DIV>
> <BLOCKQUOTE dir=3Dltr=20
> style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000080 2px =
> solid; MARGIN-RIGHT: 0px">
> <DIV><FONT face=3DArial size=3D2>As you said "<FONT =
> color=3D#000080><STRONG>C++=20
> provides all the paradigms and facilities both high level and low =
> level,..."=20
> </STRONG></FONT><FONT color=3D#000000>which I think is actualy a =
> reason for not=20
> learning C++ straight off. Also is the fact that C++ is a hybrid =
> language in=20
> that it can operate as both a structured language and an OOP language, =
> or a=20
> bit of both. When learning an approach it's important that the learner =
> is=20
> not confused by the features of a language, and is kept on a =
> 'tight=20
> leash' so to say.</FONT></FONT></DIV>
> <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
> <DIV><FONT face=3DArial><FONT size=3D2><SPAN=20
> class=3D010405823-05032002><STRONG><FONT=20
> color=3D#000080> </FONT></STRONG></SPAN>Another thing that =
> C and C++=20
> does is to expose pointers and references more than most languages, as =
> it is a=20
> middle level language. It would be better to start with high level =
> language=20
> which doesn't confuse complete newbies with such things. I think =
> pointers are=20
> one of the harder concepts that most learning programmers have to get =
> thier=20
> heads around at some point, but not right at the=20
> beginning.</FONT></FONT></DIV>
> <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
> <DIV><FONT face=3DArial size=3D2></FONT> </DIV></BLOCKQUOTE>
> <DIV dir=3Dltr><SPAN class=3D010405823-05032002><FONT face=3DArial><FONT =
>
> size=3D2><STRONG><FONT color=3D#000080>In C++ there is no need to use =
> pointers or=20
> references. For simple tasks you can use the provided facilities without =
>
> bothering for low level stuff: vectors, strings, cin, cout, e.t.c.. If =
> you need=20
> to use pointers then you are dealing with advanced concepts not being =
> able to=20
> implement them with a simpler language anyway. Also there is no need to =
> learn=20
> C!</FONT></STRONG></FONT></FONT></SPAN></DIV>
> <BLOCKQUOTE dir=3Dltr=20
> style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000080 2px =
> solid; MARGIN-RIGHT: 0px">
> <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
> <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
> <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
> <DIV><FONT face=3DArial size=3D2>As for C++ being the *best* language, =
> it's a=20
> matter of point of view, but I wouldn't say that any language is the =
> best,=20
> much the same that any spoken language is the best. When approaching a =
>
> development you choose the one that is right at the time. An =
> additional=20
> benefit of learning Pascal (or some other language) is that you can =
> write on=20
> your CV (Resume) that you can program in Pascal (or whatever). I =
> believe that=20
> Cobol programmers are very much in demand these days.</FONT></DIV>
> <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
> <DIV><FONT face=3DArial size=3D2></FONT> </DIV></BLOCKQUOTE>
> <DIV dir=3Dltr><FONT face=3DArial color=3D#000080 size=3D2><SPAN=20
> class=3D010405823-05032002><STRONG>Knowing C i bought a Pascal book and =
> learned it=20
> in 2 days. And this because C's abilities are a superset of Pascal=20
> abilities (after all the most Pascal compilers are written in C). =
> After=20
> finishing with C++ i think i can learn any programming language of any =
> of C++'s=20
> supported paradigms in the same time frame.</STRONG></SPAN></FONT></DIV>
> <DIV dir=3Dltr><FONT face=3DArial color=3D#000080 size=3D2><SPAN=20
> class=3D010405823-05032002><STRONG></STRONG></SPAN></FONT> </DIV>
> <DIV dir=3Dltr><FONT face=3DArial color=3D#000080 size=3D2><SPAN=20
> class=3D010405823-05032002><STRONG></STRONG></SPAN></FONT> </DIV>
> <DIV dir=3Dltr><FONT face=3DArial color=3D#000080 size=3D2><SPAN=20
> class=3D010405823-05032002><STRONG>C++ is not the "best language". It is =
> the "best=20
> general purpose programming language". Or if you do not like this, it is =
> the=20
> dominant general purpose programming language. :) According =
> to IDC,=20
> in 2001 the 1st in use programming language was C++ & C =
> (mainly=20
> C++), 2nd was Visual Basic and then the =
> others.</STRONG></SPAN></FONT></DIV>
> <DIV dir=3Dltr><FONT face=3DArial color=3D#000080 size=3D2><SPAN=20
> class=3D010405823-05032002><STRONG></STRONG></SPAN></FONT> </DIV>
> <DIV dir=3Dltr><FONT face=3DArial color=3D#000080 size=3D2><SPAN=20
> class=3D010405823-05032002><STRONG>I do not underestimate the other =
> languages and=20
> their followers but i am just saying the facts. After all if C++ wasn't =
> the best=20
> i would not study it in the first place. I wasn't forced to learn C++, i =
> chose=20
> to learn it after checking the facts.</STRONG></SPAN></FONT></DIV>
> <DIV dir=3Dltr><FONT face=3DArial color=3D#000080 size=3D2><SPAN=20
> class=3D010405823-05032002><STRONG></STRONG></SPAN></FONT> </DIV>
> <DIV dir=3Dltr><FONT face=3DArial color=3D#000080 size=3D2><SPAN=20
> class=3D010405823-05032002></SPAN></FONT> </DIV>
> <DIV dir=3Dltr><FONT face=3DArial color=3D#000080 size=3D2><SPAN=20
> class=3D010405823-05032002><STRONG></STRONG></SPAN></FONT> </DIV>
> <DIV dir=3Dltr><FONT face=3DArial color=3D#000080 size=3D2><SPAN=20
> class=3D010405823-05032002>
> <DIV align=3Dleft>
> <DIV align=3Dleft><STRONG><FONT face=3DArial color=3D#000080=20
> size=3D2>Ioannis</FONT></STRONG></DIV>
> <DIV align=3Dleft> </DIV>
> <DIV align=3Dleft><STRONG><FONT face=3DArial color=3D#000080 size=3D2>* =
> Ioannis=20
> Vranos</FONT></STRONG></DIV>
> <DIV><FONT color=3D#000080><STRONG><FONT face=3DArial size=3D2>* =
> Programming pages:=20
> </FONT><A href=3D"http://www.noicys.d2g.com/"
<http://www.noicys.d2g.com/>><FONT face=3DArial=20
> size=3D2>http://www.noicys.d2g.com</FONT></A></STRONG></FONT></DIV>
> <DIV><STRONG><FONT color=3D#000080><FONT face=3DArial size=3D2>* =
> Alternative URL:=20
> </FONT><A href=3D"http://run.to/noicys" <http://run.to/noicys>><FONT
face=3DArial=20
> size=3D2>http://run.to/noicys</FONT></A></FONT></STRONG></DIV></DIV></SPA=
> N></FONT></DIV></BODY></HTML>
>
> ------=_NextPart_000_0007_01C1C4B3.F2A479E0--
>
>
>
> --__--__--
>
> Message: 2
> From: Ope...@ao... <mailto:Ope...@ao...>
> Date: Tue, 5 Mar 2002 19:33:41 EST
> To: dev...@li...
<mailto:dev...@li...>
> Subject: [Dev-C++] Do Dev-C++4 support Texture Mapping?
>
>
> --part1_f3.175eb790.29b6bde5_boundary
> Content-Type: text/plain; charset="US-ASCII"
> Content-Transfer-Encoding: 7bit
>
> Ive been using Dev-C++4 for at leats 2 months now. Ive been programming
> OpenGL/ WIN32 with Dev-C++4.But When I try to texture Map with it it dont
> show My texture. Even when I download a sample from a site it dont show
the
> texture on the object. My system specs are 512MB of RAM, 1.6GIGZ in speed,
a
> nVidia TNT 2 M64 32MB of RAM AGP graphics card, WINDOWS XP. So why doesnt
it
> supports Texture Mapping and do anybody else has this same problem and how
> did you fix it.
>
> --part1_f3.175eb790.29b6bde5_boundary
> Content-Type: text/html; charset="US-ASCII"
> Content-Transfer-Encoding: 7bit
>
> <HTML><FONT FACE=arial,helvetica><FONT SIZE=2 FAMILY="SANSSERIF"
FACE="Arial" LANG="0">Ive been using Dev-C++4 for at leats 2 months now. Ive
been programming OpenGL/ WIN32 with Dev-C++4.But When I try to texture Map
with it it dont show My texture. Even when I download a sample from a site
it dont show the texture on the object. My system specs are 512MB of RAM,
1.6GIGZ in speed, a nVidia TNT 2 M64 32MB of RAM AGP graphics card, WINDOWS
XP. So why doesnt it supports Texture Mapping and do anybody else has this
same problem and how did you fix it.</FONT></HTML>
>
> --part1_f3.175eb790.29b6bde5_boundary--
>
>
> --__--__--
>
> Message: 3
> Date: Tue, 5 Mar 2002 19:41:02 -0500
> Subject: Re: [Dev-C++] Do Dev-C++4 support Texture Mapping?
> Cc: dev...@li...
<mailto:dev...@li...>
> To: Ope...@ao... <mailto:Ope...@ao...>
> From: Quentin Smith <mac...@bi...> <mailto:mac...@bi...>
>
>
> --Apple-Mail-1-560840692
> Content-Transfer-Encoding: 7bit
> Content-Type: text/plain;
> charset=US-ASCII;
> format=flowed
>
> Hi-
> a) it does support texture mapping
> b) no one else has this problem
> c) no idea
> HTH,
> --Quentin
> On Tuesday, March 5, 2002, at 07:33 PM, Ope...@ao...
<mailto:Ope...@ao...> wrote:
>
>
> > > Ive been using Dev-C++4 for at leats 2 months now. Ive been
programming
> > > OpenGL/ WIN32 with Dev-C++4.But When I try to texture Map with it it
> > > dont show My texture. Even when I download a sample from a site it
dont
> > > show the texture on the object. My system specs are 512MB of RAM,
> > > 1.6GIGZ in speed, a nVidia TNT 2 M64 32MB of RAM AGP graphics card,
> > > WINDOWS XP. So why doesnt it supports Texture Mapping and do anybody
> > > else has this same problem and how did you fix it.
> > >
>
>
> --Apple-Mail-1-560840692
> Content-Transfer-Encoding: 7bit
> Content-Type: text/enriched;
> charset=US-ASCII
>
> Hi-
>
> a) it does support texture mapping
>
> b) no one else has this problem
>
> c) no idea
>
> HTH,
>
> --Quentin
>
> On Tuesday, March 5, 2002, at 07:33 PM, Ope...@ao...
<mailto:Ope...@ao...> wrote:
>
>
> <excerpt><fontfamily><param>Arial</param><smaller>Ive been using
> Dev-C++4 for at leats 2 months now. Ive been programming OpenGL/ WIN32
> with Dev-C++4.But When I try to texture Map with it it dont show My
> texture. Even when I download a sample from a site it dont show the
> texture on the object. My system specs are 512MB of RAM, 1.6GIGZ in
> speed, a nVidia TNT 2 M64 32MB of RAM AGP graphics card, WINDOWS XP.
> So why doesnt it supports Texture Mapping and do anybody else has this
> same problem and how did you fix it.</smaller></fontfamily>
>
>
> </excerpt>
> --Apple-Mail-1-560840692--
>
>
>
> --__--__--
>
> Message: 4
> From: "Samuel Keding" <big...@ya...> <mailto:big...@ya...>
> To: <dev...@li...>
<mailto:dev...@li...>
> Date: Tue, 5 Mar 2002 19:40:37 -0600
> Subject: [Dev-C++] Re: What lang. to learn first.
>
> Hey,
>
> To be trueful, you have to make up your own mind.There our tons of langs.
> out there, each with their own benefits. If you get a good book, it can
> teach you to do structured programming in C or C++. Whatever you do, you
are
> going to have a lot of work to do on your own. There isn't nothing that is
> to hard to understand as long as you have a compiler/interpeter and a good
> book or tutorial. Some people will talk about how hard pointers are. There
> only hard if you don't point any work in understanding them at all. I am
not
> even an intermediate programming, but I can understand the ideas behind
> pointers just from doing a little reading on them. Even I used any more
time
> on them, I could even program with them. The only problem I have is I am
> wasting time on other stuff like my classes in college. When I first
started
> out I played with GW Basic, later C++. I learned as much as I put time in
> them. The main question is are you willing to put out the time necassary
to
> learn a new lang., and do you have the time. Someone else made the lang.
> unless they did a sorry job, you should be able to learn it. A language
that
> I would consider is Java, it is built on top of C++ and you can download a
> free compiler from Sun. Good Luck.
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
>
> --__--__--
>
> Message: 5
> Date: Wed, 06 Mar 2002 12:43:02 +0800
> From: Jonathan & Brigitte <jo...@pa...>
<mailto:jo...@pa...>
> To: Dev...@li...
<mailto:Dev...@li...>
> Subject: [Dev-C++] A suggestion
>
> Hi guys,
> Just a little suggestion, could you please try to send
> plain-text emails only to the list?
>
> Since I get the list in digest format, it is made quite difficult to
> read when I have the email usually first in plain-text, then in HTML
> code which I have to scroll past, and then when you have several replies
> you haven't deleted from the bottom of your email, the problem is
> compounded - making it especially hard to find the start of the next
> real new message.
>
> Thanks,
> Jonathan.
>
>
>
> --__--__--
>
> Message: 6
> From: "Mohammed Riyaz" <p_m...@ho...>
<mailto:p_m...@ho...>
> To: dev...@li...
<mailto:dev...@li...>
> Date: Wed, 06 Mar 2002 07:43:50 +0000
> Subject: [Dev-C++] help
>
>
> Hey guys,
>
> i wrote a program to solve the knight's problem.(move to every block on
the
> chess board using the knight's movements, but never reach the same block
> twice.)
>
> I feel though i coded the program right my system is unable to run the
> program.
>
> In order to test it i compiled the program with two compilers, as a result
> both the exe files gave errors. but the exe file created by dev-c++
compiler
> ran longer than the other(i.e it could try more to reach the result).
>
> the error message for both theexe files was
> " this program has performed an illegal operation and will be shut down"
>
> but the details causing the error were diffrent in the either case:
>
> When compiled with Dev-c++ compiler:
>
> KNIGHT caused a stack fault in module KERNEL32.DLL at 0167:bff7a2a1.
> Registers:
> EAX=0054fffc CS=0167 EIP=bff7a2a1 EFLGS=00000216
> EBX=78037780 SS=016f ESP=00552018 EBP=00552024
> ECX=c1413f00 DS=016f ESI=00000024 FS=4d3f
> EDX=bffc9490 ES=016f EDI=81661bc0 GS=0000
> Bytes at CS:EIP:
> 58 5f 8b e5 5d c3 a1 e8 9c fc bf 8b 08 ff 41 38
> Stack dump:
> 81660a14 00000002 c1413f00 00552044 bff75d40 00000002 00000024 78037780
> bffa0001 81660a14 00000000 00552480 78011eb2 0000000c 0055206c 00000002
>
>
>
> When compiled with borland v5.5 compiler:
>
> KNIGHT caused a stack fault in module KNI.EXE at 0167:0041557a.
> Registers:
> EAX=00000006 CS=0167 EIP=0041557a EFLGS=00010206
> EBX=00562018 SS=016f ESP=00562000 EBP=0056205c
> ECX=005624f1 DS=016f ESI=005624f1 FS=4d1f
> EDX=00000000 ES=016f EDI=0000000a GS=0000
> Bytes at CS:EIP:
> 55 53 56 57 8b 5c 24 14 8b 4c 24 18 0b c9 75 08
> Stack dump:
> 00415991 0000000a 00000000 00000024 005625e6 00562664 004159a4 0000000a
> 00000000 00000024 005625fe 00562664 00000001 00000020 0056260e 00562664
>
>
> cud some one tell me what i cud do?
> i didnt use dynamic memory allocation in my program.
> -riyaz
>
> ========================================================================
> P.Mohammed riyaz
> Student, Computer Science And Engineering
> ========================================================================
>
>
> _________________________________________________________________
> Chat with friends online, try MSN Messenger: http://messenger.msn.com
>
>
>
> --__--__--
>
> Message: 7
> From: "Ioannis Vranos" <no...@ya...> <mailto:no...@ya...>
> To: "Dev-C++" <dev...@li...>
<mailto:dev...@li...>
> Subject: RE: [Dev-C++] help
> Date: Wed, 6 Mar 2002 14:12:02 +0200
>
> We must see the source code, send it in the list.
>
>
>
> Ioannis
>
> * Ioannis Vranos
> * Programming pages: http://www.noicys.d2g.com
> * Alternative URL: http://run.to/noicys
>
>
> > > -----Original Message-----
> > > From: dev...@li...
<mailto:dev...@li...>
> > > [mailto:dev...@li...] On Behalf
> > > Of Mohammed Riyaz
> > > Sent: Wednesday, March 06, 2002 9:44 AM
> > > To: dev...@li...
<mailto:dev...@li...>
> > > Subject: [Dev-C++] help
> > >
> > >
> > >
> > > Hey guys,
> > >
> > > i wrote a program to solve the knight's problem.(move to
> > > every block on the
> > > chess board using the knight's movements, but never reach the
> > > same block
> > > twice.)
> > >
> > > I feel though i coded the program right my system is unable
> > > to run the
> > > program.
> > >
> > > In order to test it i compiled the program with two
> > > compilers, as a result
> > > both the exe files gave errors. but the exe file created by
> > > dev-c++ compiler
> > > ran longer than the other(i.e it could try more to reach the result).
> > >
> > > the error message for both theexe files was
> > > " this program has performed an illegal operation and will be
> > > shut down"
> > >
> > > but the details causing the error were diffrent in the either case:
> > >
> > > When compiled with Dev-c++ compiler:
> > >
> > > KNIGHT caused a stack fault in module KERNEL32.DLL at 0167:bff7a2a1.
> > > Registers:
> > > EAX=0054fffc CS=0167 EIP=bff7a2a1 EFLGS=00000216
> > > EBX=78037780 SS=016f ESP=00552018 EBP=00552024
> > > ECX=c1413f00 DS=016f ESI=00000024 FS=4d3f
> > > EDX=bffc9490 ES=016f EDI=81661bc0 GS=0000
> > > Bytes at CS:EIP:
> > > 58 5f 8b e5 5d c3 a1 e8 9c fc bf 8b 08 ff 41 38
> > > Stack dump:
> > > 81660a14 00000002 c1413f00 00552044 bff75d40 00000002
> > > 00000024 78037780
> > > bffa0001 81660a14 00000000 00552480 78011eb2 0000000c
> > > 0055206c 00000002
> > >
> > >
> > >
> > > When compiled with borland v5.5 compiler:
> > >
> > > KNIGHT caused a stack fault in module KNI.EXE at 0167:0041557a.
> > > Registers:
> > > EAX=00000006 CS=0167 EIP=0041557a EFLGS=00010206
> > > EBX=00562018 SS=016f ESP=00562000 EBP=0056205c
> > > ECX=005624f1 DS=016f ESI=005624f1 FS=4d1f
> > > EDX=00000000 ES=016f EDI=0000000a GS=0000
> > > Bytes at CS:EIP:
> > > 55 53 56 57 8b 5c 24 14 8b 4c 24 18 0b c9 75 08
> > > Stack dump:
> > > 00415991 0000000a 00000000 00000024 005625e6 00562664
> > > 004159a4 0000000a
> > > 00000000 00000024 005625fe 00562664 00000001 00000020
> > > 0056260e 00562664
> > >
> > >
> > > cud some one tell me what i cud do?
> > > i didnt use dynamic memory allocation in my program.
> > > -riyaz
> > >
> > > ==============================================================
> > > ==========
> > > P.Mohammed riyaz
> > > Student, Computer Science And Engineering
> > > ==============================================================
> > > ==========
> > >
> > >
> > > _________________________________________________________________
> > > Chat with friends online, try MSN Messenger: http://messenger.msn.com
> > >
> > >
> > > _______________________________________________
> > > Dev-cpp-users mailing list
> > > Dev...@li...
<mailto:Dev...@li...>
> > > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
> > >
>
>
>
>
> --__--__--
>
> Message: 8
> From: "Daniel Glenfield" <sp...@ho...>
<mailto:sp...@ho...>
> To: jo...@pa... <mailto:jo...@pa...>,
Dev...@li...
<mailto:Dev...@li...>
> Subject: Re: [Dev-C++] A suggestion
> Date: Wed, 06 Mar 2002 12:26:46 +0000
>
> <html><div style='background-color:'><DIV>
> <P>Hmm....I only get it in text, not html. Odd.<BR><BR></P></DIV>
> <DIV></DIV>
> <DIV></DIV>>From: Jonathan & Brigitte <JO...@PA...>
<mailto:JO...@PA...>
> <DIV></DIV>>To: Dev...@li...
<mailto:Dev...@li...>
> <DIV></DIV>>Subject: [Dev-C++] A suggestion
> <DIV></DIV>>Date: Wed, 06 Mar 2002 12:43:02 +0800
> <DIV></DIV>>
> <DIV></DIV>>Hi guys,
> <DIV></DIV>> Just a little suggestion, could you please try to send
> <DIV></DIV>>plain-text emails only to the list?
> <DIV></DIV>>
> <DIV></DIV>>Since I get the list in digest format, it is made quite
difficult to
> <DIV></DIV>>read when I have the email usually first in plain-text,
then in HTML
> <DIV></DIV>>code which I have to scroll past, and then when you have
several
> <DIV></DIV>>replies
> <DIV></DIV>>you haven't deleted from the bottom of your email, the
problem is
> <DIV></DIV>>compounded - making it especially hard to find the start of
the next
> <DIV></DIV>>real new message.
> <DIV></DIV>>
> <DIV></DIV>>Thanks,
> <DIV></DIV>>Jonathan.
> <DIV></DIV>>
> <DIV></DIV>>
> <DIV></DIV>>_______________________________________________
> <DIV></DIV>>Dev-cpp-users mailing list
> <DIV></DIV>>Dev...@li...
> <DIV></DIV>>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
> <DIV></DIV></div><br clear=all><hr>Join the world's largest e-mail service
with MSN Hotmail. <a href='http://g.msn.com/1HM105301/15'>Click
Here</a><br></html>
>
>
> --__--__--
>
> Message: 9
> From: "Jason Hardman" <jas...@bt...>
<mailto:jas...@bt...>
> To: "Dev-C++" <dev...@li...>
<mailto:dev...@li...>,
> "Mohammed Riyaz" <p_m...@ho...> <mailto:p_m...@ho...>
> Subject: Re: [Dev-C++] help
> Date: Wed, 6 Mar 2002 16:24:43 -0000
>
> I couldn't tell you exactly what the problem is without the seeing the
> source code, which I'm interested in doing anyway as it's not a problem
I've
> come across before. However I can suggest what may be the cause. By any
> chance is the algorithm used a recursive one? That could be one reason you
> are getting a 'stack fault' as every time you call a method you are
creating
> a new set of instance variables (amongst other things) on the stack for
it,
> and there is only a limited amount of space allocated to the stack usualy.
> Notice that in both versions the stack pointer (ESP) is about 00560000h
> which is about 5 Meg assuming it started a zero. I think on intel machines
> that is the case?
>
> There may be another cause but that seems the most likely. If you are
using
> a recursive function then try to reimplement it in a non-recursive manner,
> it will be faster that way too.
>
> If recursive calls are the cause, then this fault also suggests that there
> may be an error in the termination condition of the function(s), so you
are
> going through an infinite number of recursive calls, although it may just
be
> that the algorithm requires so many calls that the termination condition
> would never be met before a stack overflow.
>
> This is all just a stab in the dark without seeing the code, but I hope it
> helps.
>
> Jason
>
> ----- Original Message -----
> From: "Mohammed Riyaz" <p_m...@ho...>
<mailto:p_m...@ho...>
> To: <dev...@li...>
<mailto:dev...@li...>
> Sent: Wednesday, March 06, 2002 7:43 AM
> Subject: [Dev-C++] help
>
>
>
> > >
> > > Hey guys,
> > >
> > > i wrote a program to solve the knight's problem.(move to every block
on
>
> the
>
> > > chess board using the knight's movements, but never reach the same
block
> > > twice.)
> > >
> > > I feel though i coded the program right my system is unable to run
the
> > > program.
> > >
> > > In order to test it i compiled the program with two compilers, as a
result
> > > both the exe files gave errors. but the exe file created by dev-c++
>
> compiler
>
> > > ran longer than the other(i.e it could try more to reach the result).
> > >
> > > the error message for both theexe files was
> > > " this program has performed an illegal operation and will be shut
down"
> > >
> > > but the details causing the error were diffrent in the either case:
> > >
> > > When compiled with Dev-c++ compiler:
> > >
> > > KNIGHT caused a stack fault in module KERNEL32.DLL at 0167:bff7a2a1.
> > > Registers:
> > > EAX=0054fffc CS=0167 EIP=bff7a2a1 EFLGS=00000216
> > > EBX=78037780 SS=016f ESP=00552018 EBP=00552024
> > > ECX=c1413f00 DS=016f ESI=00000024 FS=4d3f
> > > EDX=bffc9490 ES=016f EDI=81661bc0 GS=0000
> > > Bytes at CS:EIP:
> > > 58 5f 8b e5 5d c3 a1 e8 9c fc bf 8b 08 ff 41 38
> > > Stack dump:
> > > 81660a14 00000002 c1413f00 00552044 bff75d40 00000002 00000024
78037780
> > > bffa0001 81660a14 00000000 00552480 78011eb2 0000000c 0055206c
00000002
> > >
> > >
> > >
> > > When compiled with borland v5.5 compiler:
> > >
> > > KNIGHT caused a stack fault in module KNI.EXE at 0167:0041557a.
> > > Registers:
> > > EAX=00000006 CS=0167 EIP=0041557a EFLGS=00010206
> > > EBX=00562018 SS=016f ESP=00562000 EBP=0056205c
> > > ECX=005624f1 DS=016f ESI=005624f1 FS=4d1f
> > > EDX=00000000 ES=016f EDI=0000000a GS=0000
> > > Bytes at CS:EIP:
> > > 55 53 56 57 8b 5c 24 14 8b 4c 24 18 0b c9 75 08
> > > Stack dump:
> > > 00415991 0000000a 00000000 00000024 005625e6 00562664 004159a4
0000000a
> > > 00000000 00000024 005625fe 00562664 00000001 00000020 0056260e
00562664
> > >
> > >
> > > cud some one tell me what i cud do?
> > > i didnt use dynamic memory allocation in my program.
> > > -riyaz
> > >
> > >
========================================================================
> > > P.Mohammed riyaz
> > > Student, Computer Science And Engineering
> > >
========================================================================
> > >
> > >
> > > _________________________________________________________________
> > > Chat with friends online, try MSN Messenger: http://messenger.msn.com
> > >
> > >
> > > _______________________________________________
> > > Dev-cpp-users mailing list
> > > Dev...@li...
<mailto:Dev...@li...>
> > > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
>
>
>
>
> --__--__--
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
<mailto:Dev...@li...>
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
>
> End of Dev-cpp-users Digest
>
>
>
>
>
|
|
From: Jonathan T. <jt...@it...> - 2002-03-08 03:14:17
|
Dear all,
Just to help those who don't understand about the HTML/NonHTML issue, and about digest formats. A digest format is where the list server bundles up a bunch of messages sent to the list, and then sends this bunch of emails as *one* complete email to my inbox. This saves having my mailbox overflowed with many individual messages, and also gives a quick way to scan what topics are covered, to see if there are any interesting mails to read. The list server sends a bunch of emails whenever it feels it has enough emails to send (haven't worked out the paramters on this particular one!).
Below I have cut and pasted a *complete* digest email I received a little while back. Hopefully your email reader hasn't tried to be super smart and render the HTML code rather than just display it raw. This, as far as digests go, is not too bad - many posts are in plain text. But yours, Daniel Glenfield is actually in HTML funnily enough.
Well hopefully you can see why it is so annoying. Please, find the option in your email program that sets it to send *plain-text* only, and use it!
Thanks,
Jonathan.
P.S. Sorry to send this rather long email to those who understand and observe the netiquette!
-------------------------------------------------------
Send Dev-cpp-users mailing list submissions to
dev...@li... <mailto:dev...@li...>
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
or, via email, send a message with subject or body 'help' to
dev...@li... <mailto:dev...@li...>
You can reach the person managing the list at
dev...@li... <mailto:dev...@li...>
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Dev-cpp-users digest..."
Today's Topics:
1. RE: (no subject) (Ioannis Vranos)
2. Do Dev-C++4 support Texture Mapping? (Ope...@ao... <mailto:Ope...@ao...>)
3. Re: Do Dev-C++4 support Texture Mapping? (Quentin Smith)
4. Re: What lang. to learn first. (Samuel Keding)
5. A suggestion (Jonathan & Brigitte)
6. help (Mohammed Riyaz)
7. RE: help (Ioannis Vranos)
8. Re: A suggestion (Daniel Glenfield)
9. Re: help (Jason Hardman)
--__--__--
Message: 1
From: "Ioannis Vranos" <no...@ya...> <mailto:no...@ya...>
To: "Dev-C++" <dev...@li...> <mailto:dev...@li...>
Subject: RE: [Dev-C++] (no subject)
Date: Wed, 6 Mar 2002 02:09:28 +0200
This is a multi-part message in MIME format.
------=_NextPart_000_0007_01C1C4B3.F2A479E0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
-----Original Message-----
From: dev...@li... <mailto:dev...@li...>
[mailto:dev...@li...] On Behalf Of
h.r...@gm... <mailto:h.r...@gm...>
Sent: Tuesday, March 05, 2002 11:19 PM
To: Dev...@li... <mailto:Dev...@li...>
Subject: Re: [Dev-C++] (no subject)
As you said "C++ provides all the paradigms and facilities both high
level and low level,..." which I think is actualy a reason for not
learning C++ straight off. Also is the fact that C++ is a hybrid
language in that it can operate as both a structured language and an OOP
language, or a bit of both. When learning an approach it's important
that the learner is not confused by the features of a language, and is
kept on a 'tight leash' so to say.
=20
Another thing that C and C++ does is to expose pointers and references
more than most languages, as it is a middle level language. It would be
better to start with high level language which doesn't confuse complete
newbies with such things. I think pointers are one of the harder
concepts that most learning programmers have to get thier heads around
at some point, but not right at the beginning.
=20
=20
In C++ there is no need to use pointers or references. For simple tasks
you can use the provided facilities without bothering for low level
stuff: vectors, strings, cin, cout, e.t.c.. If you need to use pointers
then you are dealing with advanced concepts not being able to implement
them with a simpler language anyway. Also there is no need to learn C!
=20
=20
=20
As for C++ being the *best* language, it's a matter of point of view,
but I wouldn't say that any language is the best, much the same that any
spoken language is the best. When approaching a development you choose
the one that is right at the time. An additional benefit of learning
Pascal (or some other language) is that you can write on your CV
(Resume) that you can program in Pascal (or whatever). I believe that
Cobol programmers are very much in demand these days.
=20
=20
Knowing C i bought a Pascal book and learned it in 2 days. And this
because C's abilities are a superset of Pascal abilities (after all the
most Pascal compilers are written in C). After finishing with C++ i
think i can learn any programming language of any of C++'s supported
paradigms in the same time frame.
=20
=20
C++ is not the "best language". It is the "best general purpose
programming language". Or if you do not like this, it is the dominant
general purpose programming language. [:)] According to IDC, in 2001 the
1st in use programming language was C++ & C (mainly C++), 2nd was Visual
Basic and then the others.
=20
I do not underestimate the other languages and their followers but i am
just saying the facts. After all if C++ wasn't the best i would not
study it in the first place. I wasn't forced to learn C++, i chose to
learn it after checking the facts.
=20
=20
=20
Ioannis
=20
* Ioannis Vranos
* Programming pages: <http://www.noicys.d2g.com/>
http://www.noicys.d2g.com
* Alternative URL: <http://run.to/noicys> http://run.to/noicys
------=_NextPart_000_0007_01C1C4B3.F2A479E0
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<TITLE>Message</TITLE>
<META content=3D"MSHTML 6.00.2713.1100" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DTahoma size=3D2>-----Original =
Message-----<BR><B>From:</B>=20
dev...@li...=20 <mailto:dev...@li...=20>
[mailto:dev...@li...] <B>On Behalf Of=20
</B>h.r...@gm... <mailto:h.r...@gm...><BR><B>Sent:</B> Tuesday, March 05, 2002 11:19=20
PM<BR><B>To:</B> Dev...@li... <mailto:Dev...@li...><BR><B>Subject:</B> =
Re:=20
[Dev-C++] (no subject)<BR><BR></FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000080 2px =
solid; MARGIN-RIGHT: 0px">
<DIV><FONT face=3DArial size=3D2>As you said "<FONT =
color=3D#000080><STRONG>C++=20
provides all the paradigms and facilities both high level and low =
level,..."=20
</STRONG></FONT><FONT color=3D#000000>which I think is actualy a =
reason for not=20
learning C++ straight off. Also is the fact that C++ is a hybrid =
language in=20
that it can operate as both a structured language and an OOP language, =
or a=20
bit of both. When learning an approach it's important that the learner =
is=20
not confused by the features of a language, and is kept on a =
'tight=20
leash' so to say.</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial><FONT size=3D2><SPAN=20
class=3D010405823-05032002><STRONG><FONT=20
color=3D#000080> </FONT></STRONG></SPAN>Another thing that =
C and C++=20
does is to expose pointers and references more than most languages, as =
it is a=20
middle level language. It would be better to start with high level =
language=20
which doesn't confuse complete newbies with such things. I think =
pointers are=20
one of the harder concepts that most learning programmers have to get =
thier=20
heads around at some point, but not right at the=20
beginning.</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV></BLOCKQUOTE>
<DIV dir=3Dltr><SPAN class=3D010405823-05032002><FONT face=3DArial><FONT =
size=3D2><STRONG><FONT color=3D#000080>In C++ there is no need to use =
pointers or=20
references. For simple tasks you can use the provided facilities without =
bothering for low level stuff: vectors, strings, cin, cout, e.t.c.. If =
you need=20
to use pointers then you are dealing with advanced concepts not being =
able to=20
implement them with a simpler language anyway. Also there is no need to =
learn=20
C!</FONT></STRONG></FONT></FONT></SPAN></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000080 2px =
solid; MARGIN-RIGHT: 0px">
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>As for C++ being the *best* language, =
it's a=20
matter of point of view, but I wouldn't say that any language is the =
best,=20
much the same that any spoken language is the best. When approaching a =
development you choose the one that is right at the time. An =
additional=20
benefit of learning Pascal (or some other language) is that you can =
write on=20
your CV (Resume) that you can program in Pascal (or whatever). I =
believe that=20
Cobol programmers are very much in demand these days.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV></BLOCKQUOTE>
<DIV dir=3Dltr><FONT face=3DArial color=3D#000080 size=3D2><SPAN=20
class=3D010405823-05032002><STRONG>Knowing C i bought a Pascal book and =
learned it=20
in 2 days. And this because C's abilities are a superset of Pascal=20
abilities (after all the most Pascal compilers are written in C). =
After=20
finishing with C++ i think i can learn any programming language of any =
of C++'s=20
supported paradigms in the same time frame.</STRONG></SPAN></FONT></DIV>
<DIV dir=3Dltr><FONT face=3DArial color=3D#000080 size=3D2><SPAN=20
class=3D010405823-05032002><STRONG></STRONG></SPAN></FONT> </DIV>
<DIV dir=3Dltr><FONT face=3DArial color=3D#000080 size=3D2><SPAN=20
class=3D010405823-05032002><STRONG></STRONG></SPAN></FONT> </DIV>
<DIV dir=3Dltr><FONT face=3DArial color=3D#000080 size=3D2><SPAN=20
class=3D010405823-05032002><STRONG>C++ is not the "best language". It is =
the "best=20
general purpose programming language". Or if you do not like this, it is =
the=20
dominant general purpose programming language. :) According =
to IDC,=20
in 2001 the 1st in use programming language was C++ & C =
(mainly=20
C++), 2nd was Visual Basic and then the =
others.</STRONG></SPAN></FONT></DIV>
<DIV dir=3Dltr><FONT face=3DArial color=3D#000080 size=3D2><SPAN=20
class=3D010405823-05032002><STRONG></STRONG></SPAN></FONT> </DIV>
<DIV dir=3Dltr><FONT face=3DArial color=3D#000080 size=3D2><SPAN=20
class=3D010405823-05032002><STRONG>I do not underestimate the other =
languages and=20
their followers but i am just saying the facts. After all if C++ wasn't =
the best=20
i would not study it in the first place. I wasn't forced to learn C++, i =
chose=20
to learn it after checking the facts.</STRONG></SPAN></FONT></DIV>
<DIV dir=3Dltr><FONT face=3DArial color=3D#000080 size=3D2><SPAN=20
class=3D010405823-05032002><STRONG></STRONG></SPAN></FONT> </DIV>
<DIV dir=3Dltr><FONT face=3DArial color=3D#000080 size=3D2><SPAN=20
class=3D010405823-05032002></SPAN></FONT> </DIV>
<DIV dir=3Dltr><FONT face=3DArial color=3D#000080 size=3D2><SPAN=20
class=3D010405823-05032002><STRONG></STRONG></SPAN></FONT> </DIV>
<DIV dir=3Dltr><FONT face=3DArial color=3D#000080 size=3D2><SPAN=20
class=3D010405823-05032002>
<DIV align=3Dleft>
<DIV align=3Dleft><STRONG><FONT face=3DArial color=3D#000080=20
size=3D2>Ioannis</FONT></STRONG></DIV>
<DIV align=3Dleft> </DIV>
<DIV align=3Dleft><STRONG><FONT face=3DArial color=3D#000080 size=3D2>* =
Ioannis=20
Vranos</FONT></STRONG></DIV>
<DIV><FONT color=3D#000080><STRONG><FONT face=3DArial size=3D2>* =
Programming pages:=20
</FONT><A href=3D"http://www.noicys.d2g.com/" <http://www.noicys.d2g.com/>><FONT face=3DArial=20
size=3D2>http://www.noicys.d2g.com</FONT></A></STRONG></FONT></DIV>
<DIV><STRONG><FONT color=3D#000080><FONT face=3DArial size=3D2>* =
Alternative URL:=20
</FONT><A href=3D"http://run.to/noicys" <http://run.to/noicys>><FONT face=3DArial=20
size=3D2>http://run.to/noicys</FONT></A></FONT></STRONG></DIV></DIV></SPA=
N></FONT></DIV></BODY></HTML>
------=_NextPart_000_0007_01C1C4B3.F2A479E0--
--__--__--
Message: 2
From: Ope...@ao... <mailto:Ope...@ao...>
Date: Tue, 5 Mar 2002 19:33:41 EST
To: dev...@li... <mailto:dev...@li...>
Subject: [Dev-C++] Do Dev-C++4 support Texture Mapping?
--part1_f3.175eb790.29b6bde5_boundary
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit
Ive been using Dev-C++4 for at leats 2 months now. Ive been programming
OpenGL/ WIN32 with Dev-C++4.But When I try to texture Map with it it dont
show My texture. Even when I download a sample from a site it dont show the
texture on the object. My system specs are 512MB of RAM, 1.6GIGZ in speed, a
nVidia TNT 2 M64 32MB of RAM AGP graphics card, WINDOWS XP. So why doesnt it
supports Texture Mapping and do anybody else has this same problem and how
did you fix it.
--part1_f3.175eb790.29b6bde5_boundary
Content-Type: text/html; charset="US-ASCII"
Content-Transfer-Encoding: 7bit
<HTML><FONT FACE=arial,helvetica><FONT SIZE=2 FAMILY="SANSSERIF" FACE="Arial" LANG="0">Ive been using Dev-C++4 for at leats 2 months now. Ive been programming OpenGL/ WIN32 with Dev-C++4.But When I try to texture Map with it it dont show My texture. Even when I download a sample from a site it dont show the texture on the object. My system specs are 512MB of RAM, 1.6GIGZ in speed, a nVidia TNT 2 M64 32MB of RAM AGP graphics card, WINDOWS XP. So why doesnt it supports Texture Mapping and do anybody else has this same problem and how did you fix it.</FONT></HTML>
--part1_f3.175eb790.29b6bde5_boundary--
--__--__--
Message: 3
Date: Tue, 5 Mar 2002 19:41:02 -0500
Subject: Re: [Dev-C++] Do Dev-C++4 support Texture Mapping?
Cc: dev...@li... <mailto:dev...@li...>
To: Ope...@ao... <mailto:Ope...@ao...>
From: Quentin Smith <mac...@bi...> <mailto:mac...@bi...>
--Apple-Mail-1-560840692
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=US-ASCII;
format=flowed
Hi-
a) it does support texture mapping
b) no one else has this problem
c) no idea
HTH,
--Quentin
On Tuesday, March 5, 2002, at 07:33 PM, Ope...@ao... <mailto:Ope...@ao...> wrote:
> > Ive been using Dev-C++4 for at leats 2 months now. Ive been programming
> > OpenGL/ WIN32 with Dev-C++4.But When I try to texture Map with it it
> > dont show My texture. Even when I download a sample from a site it dont
> > show the texture on the object. My system specs are 512MB of RAM,
> > 1.6GIGZ in speed, a nVidia TNT 2 M64 32MB of RAM AGP graphics card,
> > WINDOWS XP. So why doesnt it supports Texture Mapping and do anybody
> > else has this same problem and how did you fix it.
> >
--Apple-Mail-1-560840692
Content-Transfer-Encoding: 7bit
Content-Type: text/enriched;
charset=US-ASCII
Hi-
a) it does support texture mapping
b) no one else has this problem
c) no idea
HTH,
--Quentin
On Tuesday, March 5, 2002, at 07:33 PM, Ope...@ao... <mailto:Ope...@ao...> wrote:
<excerpt><fontfamily><param>Arial</param><smaller>Ive been using
Dev-C++4 for at leats 2 months now. Ive been programming OpenGL/ WIN32
with Dev-C++4.But When I try to texture Map with it it dont show My
texture. Even when I download a sample from a site it dont show the
texture on the object. My system specs are 512MB of RAM, 1.6GIGZ in
speed, a nVidia TNT 2 M64 32MB of RAM AGP graphics card, WINDOWS XP.
So why doesnt it supports Texture Mapping and do anybody else has this
same problem and how did you fix it.</smaller></fontfamily>
</excerpt>
--Apple-Mail-1-560840692--
--__--__--
Message: 4
From: "Samuel Keding" <big...@ya...> <mailto:big...@ya...>
To: <dev...@li...> <mailto:dev...@li...>
Date: Tue, 5 Mar 2002 19:40:37 -0600
Subject: [Dev-C++] Re: What lang. to learn first.
Hey,
To be trueful, you have to make up your own mind.There our tons of langs.
out there, each with their own benefits. If you get a good book, it can
teach you to do structured programming in C or C++. Whatever you do, you are
going to have a lot of work to do on your own. There isn't nothing that is
to hard to understand as long as you have a compiler/interpeter and a good
book or tutorial. Some people will talk about how hard pointers are. There
only hard if you don't point any work in understanding them at all. I am not
even an intermediate programming, but I can understand the ideas behind
pointers just from doing a little reading on them. Even I used any more time
on them, I could even program with them. The only problem I have is I am
wasting time on other stuff like my classes in college. When I first started
out I played with GW Basic, later C++. I learned as much as I put time in
them. The main question is are you willing to put out the time necassary to
learn a new lang., and do you have the time. Someone else made the lang.
unless they did a sorry job, you should be able to learn it. A language that
I would consider is Java, it is built on top of C++ and you can download a
free compiler from Sun. Good Luck.
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
--__--__--
Message: 5
Date: Wed, 06 Mar 2002 12:43:02 +0800
From: Jonathan & Brigitte <jo...@pa...> <mailto:jo...@pa...>
To: Dev...@li... <mailto:Dev...@li...>
Subject: [Dev-C++] A suggestion
Hi guys,
Just a little suggestion, could you please try to send
plain-text emails only to the list?
Since I get the list in digest format, it is made quite difficult to
read when I have the email usually first in plain-text, then in HTML
code which I have to scroll past, and then when you have several replies
you haven't deleted from the bottom of your email, the problem is
compounded - making it especially hard to find the start of the next
real new message.
Thanks,
Jonathan.
--__--__--
Message: 6
From: "Mohammed Riyaz" <p_m...@ho...> <mailto:p_m...@ho...>
To: dev...@li... <mailto:dev...@li...>
Date: Wed, 06 Mar 2002 07:43:50 +0000
Subject: [Dev-C++] help
Hey guys,
i wrote a program to solve the knight's problem.(move to every block on the
chess board using the knight's movements, but never reach the same block
twice.)
I feel though i coded the program right my system is unable to run the
program.
In order to test it i compiled the program with two compilers, as a result
both the exe files gave errors. but the exe file created by dev-c++ compiler
ran longer than the other(i.e it could try more to reach the result).
the error message for both theexe files was
" this program has performed an illegal operation and will be shut down"
but the details causing the error were diffrent in the either case:
When compiled with Dev-c++ compiler:
KNIGHT caused a stack fault in module KERNEL32.DLL at 0167:bff7a2a1.
Registers:
EAX=0054fffc CS=0167 EIP=bff7a2a1 EFLGS=00000216
EBX=78037780 SS=016f ESP=00552018 EBP=00552024
ECX=c1413f00 DS=016f ESI=00000024 FS=4d3f
EDX=bffc9490 ES=016f EDI=81661bc0 GS=0000
Bytes at CS:EIP:
58 5f 8b e5 5d c3 a1 e8 9c fc bf 8b 08 ff 41 38
Stack dump:
81660a14 00000002 c1413f00 00552044 bff75d40 00000002 00000024 78037780
bffa0001 81660a14 00000000 00552480 78011eb2 0000000c 0055206c 00000002
When compiled with borland v5.5 compiler:
KNIGHT caused a stack fault in module KNI.EXE at 0167:0041557a.
Registers:
EAX=00000006 CS=0167 EIP=0041557a EFLGS=00010206
EBX=00562018 SS=016f ESP=00562000 EBP=0056205c
ECX=005624f1 DS=016f ESI=005624f1 FS=4d1f
EDX=00000000 ES=016f EDI=0000000a GS=0000
Bytes at CS:EIP:
55 53 56 57 8b 5c 24 14 8b 4c 24 18 0b c9 75 08
Stack dump:
00415991 0000000a 00000000 00000024 005625e6 00562664 004159a4 0000000a
00000000 00000024 005625fe 00562664 00000001 00000020 0056260e 00562664
cud some one tell me what i cud do?
i didnt use dynamic memory allocation in my program.
-riyaz
========================================================================
P.Mohammed riyaz
Student, Computer Science And Engineering
========================================================================
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
--__--__--
Message: 7
From: "Ioannis Vranos" <no...@ya...> <mailto:no...@ya...>
To: "Dev-C++" <dev...@li...> <mailto:dev...@li...>
Subject: RE: [Dev-C++] help
Date: Wed, 6 Mar 2002 14:12:02 +0200
We must see the source code, send it in the list.
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.d2g.com
* Alternative URL: http://run.to/noicys
> > -----Original Message-----
> > From: dev...@li... <mailto:dev...@li...>
> > [mailto:dev...@li...] On Behalf
> > Of Mohammed Riyaz
> > Sent: Wednesday, March 06, 2002 9:44 AM
> > To: dev...@li... <mailto:dev...@li...>
> > Subject: [Dev-C++] help
> >
> >
> >
> > Hey guys,
> >
> > i wrote a program to solve the knight's problem.(move to
> > every block on the
> > chess board using the knight's movements, but never reach the
> > same block
> > twice.)
> >
> > I feel though i coded the program right my system is unable
> > to run the
> > program.
> >
> > In order to test it i compiled the program with two
> > compilers, as a result
> > both the exe files gave errors. but the exe file created by
> > dev-c++ compiler
> > ran longer than the other(i.e it could try more to reach the result).
> >
> > the error message for both theexe files was
> > " this program has performed an illegal operation and will be
> > shut down"
> >
> > but the details causing the error were diffrent in the either case:
> >
> > When compiled with Dev-c++ compiler:
> >
> > KNIGHT caused a stack fault in module KERNEL32.DLL at 0167:bff7a2a1.
> > Registers:
> > EAX=0054fffc CS=0167 EIP=bff7a2a1 EFLGS=00000216
> > EBX=78037780 SS=016f ESP=00552018 EBP=00552024
> > ECX=c1413f00 DS=016f ESI=00000024 FS=4d3f
> > EDX=bffc9490 ES=016f EDI=81661bc0 GS=0000
> > Bytes at CS:EIP:
> > 58 5f 8b e5 5d c3 a1 e8 9c fc bf 8b 08 ff 41 38
> > Stack dump:
> > 81660a14 00000002 c1413f00 00552044 bff75d40 00000002
> > 00000024 78037780
> > bffa0001 81660a14 00000000 00552480 78011eb2 0000000c
> > 0055206c 00000002
> >
> >
> >
> > When compiled with borland v5.5 compiler:
> >
> > KNIGHT caused a stack fault in module KNI.EXE at 0167:0041557a.
> > Registers:
> > EAX=00000006 CS=0167 EIP=0041557a EFLGS=00010206
> > EBX=00562018 SS=016f ESP=00562000 EBP=0056205c
> > ECX=005624f1 DS=016f ESI=005624f1 FS=4d1f
> > EDX=00000000 ES=016f EDI=0000000a GS=0000
> > Bytes at CS:EIP:
> > 55 53 56 57 8b 5c 24 14 8b 4c 24 18 0b c9 75 08
> > Stack dump:
> > 00415991 0000000a 00000000 00000024 005625e6 00562664
> > 004159a4 0000000a
> > 00000000 00000024 005625fe 00562664 00000001 00000020
> > 0056260e 00562664
> >
> >
> > cud some one tell me what i cud do?
> > i didnt use dynamic memory allocation in my program.
> > -riyaz
> >
> > ==============================================================
> > ==========
> > P.Mohammed riyaz
> > Student, Computer Science And Engineering
> > ==============================================================
> > ==========
> >
> >
> > _________________________________________________________________
> > Chat with friends online, try MSN Messenger: http://messenger.msn.com
> >
> >
> > _______________________________________________
> > Dev-cpp-users mailing list
> > Dev...@li... <mailto:Dev...@li...>
> > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
> >
--__--__--
Message: 8
From: "Daniel Glenfield" <sp...@ho...> <mailto:sp...@ho...>
To: jo...@pa... <mailto:jo...@pa...>, Dev...@li... <mailto:Dev...@li...>
Subject: Re: [Dev-C++] A suggestion
Date: Wed, 06 Mar 2002 12:26:46 +0000
<html><div style='background-color:'><DIV>
<P>Hmm....I only get it in text, not html. Odd.<BR><BR></P></DIV>
<DIV></DIV>
<DIV></DIV>>From: Jonathan & Brigitte <JO...@PA...> <mailto:JO...@PA...>
<DIV></DIV>>To: Dev...@li... <mailto:Dev...@li...>
<DIV></DIV>>Subject: [Dev-C++] A suggestion
<DIV></DIV>>Date: Wed, 06 Mar 2002 12:43:02 +0800
<DIV></DIV>>
<DIV></DIV>>Hi guys,
<DIV></DIV>> Just a little suggestion, could you please try to send
<DIV></DIV>>plain-text emails only to the list?
<DIV></DIV>>
<DIV></DIV>>Since I get the list in digest format, it is made quite difficult to
<DIV></DIV>>read when I have the email usually first in plain-text, then in HTML
<DIV></DIV>>code which I have to scroll past, and then when you have several
<DIV></DIV>>replies
<DIV></DIV>>you haven't deleted from the bottom of your email, the problem is
<DIV></DIV>>compounded - making it especially hard to find the start of the next
<DIV></DIV>>real new message.
<DIV></DIV>>
<DIV></DIV>>Thanks,
<DIV></DIV>>Jonathan.
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>_______________________________________________
<DIV></DIV>>Dev-cpp-users mailing list
<DIV></DIV>>Dev...@li...
<DIV></DIV>>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
<DIV></DIV></div><br clear=all><hr>Join the world's largest e-mail service with MSN Hotmail. <a href='http://g.msn.com/1HM105301/15'>Click Here</a><br></html>
--__--__--
Message: 9
From: "Jason Hardman" <jas...@bt...> <mailto:jas...@bt...>
To: "Dev-C++" <dev...@li...> <mailto:dev...@li...>,
"Mohammed Riyaz" <p_m...@ho...> <mailto:p_m...@ho...>
Subject: Re: [Dev-C++] help
Date: Wed, 6 Mar 2002 16:24:43 -0000
I couldn't tell you exactly what the problem is without the seeing the
source code, which I'm interested in doing anyway as it's not a problem I've
come across before. However I can suggest what may be the cause. By any
chance is the algorithm used a recursive one? That could be one reason you
are getting a 'stack fault' as every time you call a method you are creating
a new set of instance variables (amongst other things) on the stack for it,
and there is only a limited amount of space allocated to the stack usualy.
Notice that in both versions the stack pointer (ESP) is about 00560000h
which is about 5 Meg assuming it started a zero. I think on intel machines
that is the case?
There may be another cause but that seems the most likely. If you are using
a recursive function then try to reimplement it in a non-recursive manner,
it will be faster that way too.
If recursive calls are the cause, then this fault also suggests that there
may be an error in the termination condition of the function(s), so you are
going through an infinite number of recursive calls, although it may just be
that the algorithm requires so many calls that the termination condition
would never be met before a stack overflow.
This is all just a stab in the dark without seeing the code, but I hope it
helps.
Jason
----- Original Message -----
From: "Mohammed Riyaz" <p_m...@ho...> <mailto:p_m...@ho...>
To: <dev...@li...> <mailto:dev...@li...>
Sent: Wednesday, March 06, 2002 7:43 AM
Subject: [Dev-C++] help
> >
> > Hey guys,
> >
> > i wrote a program to solve the knight's problem.(move to every block on
the
> > chess board using the knight's movements, but never reach the same block
> > twice.)
> >
> > I feel though i coded the program right my system is unable to run the
> > program.
> >
> > In order to test it i compiled the program with two compilers, as a result
> > both the exe files gave errors. but the exe file created by dev-c++
compiler
> > ran longer than the other(i.e it could try more to reach the result).
> >
> > the error message for both theexe files was
> > " this program has performed an illegal operation and will be shut down"
> >
> > but the details causing the error were diffrent in the either case:
> >
> > When compiled with Dev-c++ compiler:
> >
> > KNIGHT caused a stack fault in module KERNEL32.DLL at 0167:bff7a2a1.
> > Registers:
> > EAX=0054fffc CS=0167 EIP=bff7a2a1 EFLGS=00000216
> > EBX=78037780 SS=016f ESP=00552018 EBP=00552024
> > ECX=c1413f00 DS=016f ESI=00000024 FS=4d3f
> > EDX=bffc9490 ES=016f EDI=81661bc0 GS=0000
> > Bytes at CS:EIP:
> > 58 5f 8b e5 5d c3 a1 e8 9c fc bf 8b 08 ff 41 38
> > Stack dump:
> > 81660a14 00000002 c1413f00 00552044 bff75d40 00000002 00000024 78037780
> > bffa0001 81660a14 00000000 00552480 78011eb2 0000000c 0055206c 00000002
> >
> >
> >
> > When compiled with borland v5.5 compiler:
> >
> > KNIGHT caused a stack fault in module KNI.EXE at 0167:0041557a.
> > Registers:
> > EAX=00000006 CS=0167 EIP=0041557a EFLGS=00010206
> > EBX=00562018 SS=016f ESP=00562000 EBP=0056205c
> > ECX=005624f1 DS=016f ESI=005624f1 FS=4d1f
> > EDX=00000000 ES=016f EDI=0000000a GS=0000
> > Bytes at CS:EIP:
> > 55 53 56 57 8b 5c 24 14 8b 4c 24 18 0b c9 75 08
> > Stack dump:
> > 00415991 0000000a 00000000 00000024 005625e6 00562664 004159a4 0000000a
> > 00000000 00000024 005625fe 00562664 00000001 00000020 0056260e 00562664
> >
> >
> > cud some one tell me what i cud do?
> > i didnt use dynamic memory allocation in my program.
> > -riyaz
> >
> > ========================================================================
> > P.Mohammed riyaz
> > Student, Computer Science And Engineering
> > ========================================================================
> >
> >
> > _________________________________________________________________
> > Chat with friends online, try MSN Messenger: http://messenger.msn.com
> >
> >
> > _______________________________________________
> > Dev-cpp-users mailing list
> > Dev...@li... <mailto:Dev...@li...>
> > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
--__--__--
_______________________________________________
Dev-cpp-users mailing list
Dev...@li... <mailto:Dev...@li...>
https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
End of Dev-cpp-users Digest
|
|
From: Ioannis V. <no...@ya...> - 2002-03-07 19:49:20
|
> -----Original Message----- > From: dev...@li...=20 > [mailto:dev...@li...] On Behalf=20 > Of Mohammed Riyaz > Sent: Thursday, March 07, 2002 6:05 PM > To: dev...@li... > Subject: RE: [Dev-C++] reg-Knight's tour problem >=20 >=20 > hey ioannis; > The variables i,j are members of the class. Why do you say=20 > recursion never=20 > end. The function assignment calls the other functions=20 > 'refresh', 'value' in the line >=20 > refresh(); > pos=3Dvalue(j+(8*i)); Apologies, i was in a hurry and said stupid things. I' ll never do that again. Ioannis =20 * Ioannis Vranos * Programming pages: http://www.noicys.d2g.com * Alternative URL: http://run.to/noicys |
|
From: Ioannis V. <no...@ya...> - 2002-03-07 19:48:47
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of Santiago Palmier Campos > Sent: Thursday, March 07, 2002 3:57 PM > To: Dev-C++ > Subject: RE: [Dev-C++] reg-Knight's tour problem > > > Hi to *, > > There's NO compiler defect (with this issue), so... Don't panic! ;o) > > The variables 'i' & 'j' are class' members, defined on line: > > > int row_loc,pos,i,j; > > Just my 2 cents, regards > Santy Oops! Apologies, i should be more careful. Ioannis gives to Santiago 2 Eurocents. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.d2g.com * Alternative URL: http://run.to/noicys |
|
From: Benjamin W. <ben...@ho...> - 2002-03-07 18:04:38
|
<html><div style='background-color:'><DIV> <P>Carlos,</P> <P>I think most people would agree with the previous two responses. Charles Petzold's Programming Windows 5th Ed. is where most newbie's start. It's a great book and you can check out information both on the book and on the author at:</P> <P><A href="http://www">http://www</A>.charlespetzold.com</P> <P>Best of luck and I hope you find what you are looking for.</P></DIV> <DIV></DIV> <DIV><FONT face="Geneva, Arial, Sans-serif" size=2>Benjamin Wheeless</FONT></DIV> <DIV></DIV> <DIV><FONT face="Geneva, Arial, Sans-serif" size=2><STRONG>Network Systems - Delta Airlines, Inc.</STRONG></FONT></DIV> <DIV></DIV> <DIV><FONT face=Arial size=2><STRONG>Atlanta, GA - USA 30320</STRONG></FONT></DIV> <DIV></DIV> <DIV><FONT face=Arial size=2><STRONG>==============================</STRONG></FONT></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV>----Original Message Follows---- <DIV></DIV>From: carlos GARCÍA DEL MONTE <CG...@WO...> <DIV></DIV>To: dev...@li... <DIV></DIV>Subject: [Dev-C++] learn windows... <DIV></DIV>Date: Thu, 07 Mar 2002 18:15:27 +0100 <DIV></DIV> <DIV></DIV>Hi, I am going to learn windows programming (in c++ better than just <DIV></DIV>only c), but in the libraries I only find old and very, very, very bad <DIV></DIV>books, so I cannot search one good before buying one, so if someone <DIV></DIV>could say which can be good enough I would thank him. Thank you! <DIV></DIV> <DIV></DIV>P.S. The last messages I sent I received a message sayin g it couldn't <DIV></DIV>be sent, but it was sent. <DIV></DIV> <DIV></DIV> <DIV></DIV>_______________________________________________ <DIV></DIV>Dev-cpp-users mailing list <DIV></DIV>Dev...@li... <DIV></DIV>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users <DIV></DIV></div><br clear=all><hr>Chat with friends online, try MSN Messenger: <a href='http://g.msn.com/1HM105401/12'>Click Here</a><br></html> |
|
From: Lorenzo <co...@in...> - 2002-03-07 17:45:31
|
I think that "Programming Windows by Charles Petzold" is a classic for newbie of the windows programing. N.B. This book refers to the c language and it is only for base windows programming not cover anyone advanted tecnique. ---------------------------------------------------------------------------- --- If debugging is the process of removing bugs, then programming must be the process of putting them in. ---------------------------------------------------------------------------- --- |
|
From: Santiago P. C. <San...@yd...> - 2002-03-07 17:36:49
|
Hi Carlos, Take a look at Charles Petzold's books on "Programming Windows", I think there are books for 95, NT, etc... I think they're really good books (but I can't remember now if they're focussed on C or C++). Best regards, Santy -----Original Message----- From: carlos GARC=CDA DEL MONTE [mailto:cg...@wo...]=20 Sent: Thursday, March 07, 2002 6:15 PM To: dev...@li... Subject: [Dev-C++] learn windows... Hi, I am going to learn windows programming (in c++ better than just only= c), but in the libraries I only find old and very, very, very bad books, = so I cannot search one good before buying one, so if someone could say which= can be good enough I would thank him. Thank you! P.S. The last messages I sent I received a message sayin g it couldn't be= sent, but it was sent. _______________________________________________ Dev-cpp-users mailing list Dev...@li... https://lists.sourceforge.net/lists/listinfo/dev-cpp-users -------------------------------------------------------------------------= ------------- This message and any files transmitted with it are confidential and inten= ded solely=20 for the use of the individual or entity to whom they are addressed. No co= nfidentiality=20 or privilege is waived or lost by any wrong transmission.=20 If you have received this message in error, please immediately destroy it= =20and kindly=20 notify the sender by reply email. You must not, directly or indirectly, use, disclose, distribute, print, o= r copy any=20 part of this message if you are not the intended recipient. Opinions, con= clusions and=20 other information in this message that do not relate to the official busi= ness of=20 People Communications S.A. shall be understood as neither given nor endor= sed by it.=20 -------------------------------------------------------------------------= ------------- |
|
From: Santiago P. C. <San...@yd...> - 2002-03-07 17:19:07
|
Hi Mohammed,
Let me try to give some help on this issue O:o)
A 'common' recursive algorithm looks like this one:
// Calculate factorial of int number
int recursive_function(int iParameter)
{
// Check for posible errors
if (iParameter < 0)
{
cout << "ERROR: Negative number!" << endl;
exit(SOME_ERROR_VALUE);
}
// Check race condition
if (iParameter == 0)
{
// We got it! No more loops ;o)
return 1;
}
else
{
// Handle params & manage with values
int iCurrentValue = iParameter;
iParameter--;
return (iCurrentValue*recursive_function(iParameter));
}
}
This is not THE answer, it's a simple function to ilustrate recursive
algorithms, there are variants depending on the desired behaviour of the
function (p.e. you can handle parameter/s before checking the race
condition).
The point here is that you must reach the race condition inside the function
and terminate the program normally, if you don't do that you'll exit the
program 'the hard way' even when the program itself succeeds.
As a good programming practice you should try to avoid exiting abruptly,
instead of this, you should perform any necessary cleanup tasks when you
exit a program p.e.: close open files, deallocate reserved memory, etc...
Hope this helps!
Best regards, Santy
-----Original Message-----
From: Mohammed Riyaz [mailto:p_m...@ho...]
Sent: Thursday, March 07, 2002 5:05 PM
To: dev...@li...
Subject: RE: [Dev-C++] reg-Knight's tour problem
hey ioannis;
The variables i,j are members of the class. Why do you say recursion never
end. The function assignment calls the other functions 'refresh', 'value' in
the line
refresh();
pos=value(j+(8*i));
hence when the this situation (given below)arises in the function value, the
program wil hald and hence the recursion ends there.
if(row_loc<0) {cout<<"NO SOLUTION";system("pause");exit(0);}
(or)
when the situation
if(l==63)
{
cout<<"RESULT :"<<endl;
for(int k=0;k<64;k++)
cout<<denied[k]<<" ";
system("pause");
exit(0);
}
in refresh function is encountered the recursion ends.
-Riyaz
--------------------------------------------------------------------------------------
This message and any files transmitted with it are confidential and intended solely
for the use of the individual or entity to whom they are addressed. No confidentiality
or privilege is waived or lost by any wrong transmission.
If you have received this message in error, please immediately destroy it and kindly
notify the sender by reply email.
You must not, directly or indirectly, use, disclose, distribute, print, or copy any
part of this message if you are not the intended recipient. Opinions, conclusions and
other information in this message that do not relate to the official business of
People Communications S.A. shall be understood as neither given nor endorsed by it.
--------------------------------------------------------------------------------------
|
|
From: carlos D. M. <cg...@wo...> - 2002-03-07 17:17:51
|
Hi, I am going to learn windows programming (in c++ better than just only c), but in the libraries I only find old and very, very, very bad books, so I cannot search one good before buying one, so if someone could say which can be good enough I would thank him. Thank you! P.S. The last messages I sent I received a message sayin g it couldn't be sent, but it was sent. |