dev-cpp-users Mailing List for Dev-C++ (Page 639)
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: L. C. <cla...@ho...> - 2001-12-16 18:27:05
|
I would appreciate if anyone could help me with the following:After downloding devcpp and setup zip,whenever I try to open them, I get the Message:"C:WINDOWS\Desktop\setup.zp is not a valid Win32 application". Could anyone help me with this problem? Thanks, Claudia _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com |
|
From: <jd...@da...> - 2001-12-16 17:39:08
|
Nice Question! I'd like to read some answer! |
|
From: <Dan...@ao...> - 2001-12-16 16:22:12
|
|
From: Brian M. <str...@ho...> - 2001-12-16 04:19:01
|
What exactly is a DLL, how can i use it, what goes into it, and can a BASIC program use a DLL written made by dev-C++? _________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com |
|
From: http//:angelfire.com/dc/85 Sale's <bc...@ms...> - 2001-12-15 23:51:22
|
Get paid to do anything at my website.Get paid to do nothing.And get paid to chat and learn about c++,while you are getting paid to listin to the radio.It's Sweet. http://angelfire.com/dc/85 _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. |
|
From: Ian W. <lak...@ho...> - 2001-12-15 23:02:23
|
USING GLUT... hello people. i have two quick questions about opengl: 1) i know how to load a single texture and apply it to a 3D object, but does anybody know how to load two textures and apply them to different surfaces? 2) is there a way of displaying text when using opengl. e.g. like the frame rate in the top corner? thankyou in advance to anybody that can help. ian _________________________________________________________________ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com |
|
From: Ian W. <lak...@ho...> - 2001-12-15 23:02:01
|
hello people. i have two quick questions about opengl: 1) i know how to load a single texture and apply it to a 3D object, but does anybody know how to load two textures and apply them to different surfaces? 2) is there a way of displaying text when using opengl. e.g. like the frame rate in the top corner? thankyou in advance to anybody that can help. ian _________________________________________________________________ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com |
|
From: Sheik-Bahae S. <sh...@ya...> - 2001-12-15 21:17:53
|
Hi,
I have problem with Linker. when I compile my code I get the following linker messages:
c:\program files\webots 3.0\controllers\pr_kiki\pr_kiki.o(.text+0x27):pr_kiki.c: undefined reference to `robot_get_device'
c:\program files\webots 3.0\controllers\pr_kiki\pr_kiki.o(.text+0x3e):pr_kiki.c: undefined reference to `robot_get_device'
c:\program files\webots 3.0\controllers\pr_kiki\pr_kiki.o(.text+0x65):pr_kiki.c: undefined reference to `g_print'
c:\program files\webots 3.0\controllers\pr_kiki\pr_kiki.o(.text+0xa4):pr_kiki.c: undefined reference to `robot_live'
c:\program files\webots 3.0\controllers\pr_kiki\pr_kiki.o(.text+0xb4):pr_kiki.c: undefined reference to `robot_live'
c:\program files\webots 3.0\controllers\pr_kiki\pr_kiki.o(.text+0xc9):pr_kiki.c: undefined reference to `distance_sensor_enable'
c:\program files\webots 3.0\controllers\pr_kiki\pr_kiki.o(.text+0xde):pr_kiki.c: undefined reference to `distance_sensor_enable'
c:\program files\webots 3.0\controllers\pr_kiki\pr_kiki.o(.text+0xee):pr_kiki.c: undefined reference to `supervisor_node_get_from_def'
c:\program files\webots 3.0\controllers\pr_kiki\pr_kiki.o(.text+0x107):pr_kiki.c: undefined reference to `supervisor_field_get'
c:\program files\webots 3.0\controllers\pr_kiki\pr_kiki.o(.text+0x134):pr_kiki.c: undefined reference to `g_print'
c:\program files\webots 3.0\controllers\pr_kiki\pr_kiki.o(.text+0x147):pr_kiki.c: undefined reference to `distance_sensor_get_value'
c:\program files\webots 3.0\controllers\pr_kiki\pr_kiki.o(.text+0x160):pr_kiki.c: undefined reference to `distance_sensor_get_value'
c:\program files\webots 3.0\controllers\pr_kiki\pr_kiki.o(.text+0x1da):pr_kiki.c: undefined reference to `differential_wheels_set_speed'
c:\program files\webots 3.0\controllers\pr_kiki\pr_kiki.o(.text+0x1e7):pr_kiki.c: undefined reference to `robot_step'
and my code is:
#include <stdio.h>
#include <robot.h>
#include <differential_wheels.h>
#include <distance_sensor.h>
#include <gtk/gtk.h>
#include <supervisor.h>
#define SPEED 100
static device_tag ir0,ir1;
void reset(void) {
ir0 = robot_get_device("ir0");
ir1 = robot_get_device("ir1");
g_print("ir0=%d ir1=%d\n",ir0,ir1);
}
int main() {
gint16 left_speed,right_speed;
guint16 ir0_value,ir1_value;
node_ref kiki;
gfloat a[3],b[3];
gint i=0;
//robot_live(NULL);
robot_live(reset);
distance_sensor_enable(ir0,64);
distance_sensor_enable(ir1,64);
kiki = supervisor_node_get_from_def("KIKI");
supervisor_field_get(kiki,SUPERVISOR_FIELD_TRANSLATION,(gpointer)a,64);
for(;;) { /* The robot never dies! */
g_print("KIKI is at (%g,%g,%g)\n",a[0],a[1],a[2]);
ir0_value = distance_sensor_get_value(ir0);
ir1_value = distance_sensor_get_value(ir1);
if ((ir1_value>200) && (ir0_value>200)){
left_speed = -20;
right_speed = -20;
}
else if (ir1_value>100) {
left_speed = -20;
right_speed = 20;
}
else if (ir0_value>100) {
left_speed = 20;
right_speed = -20;
}
else {
left_speed =SPEED;
right_speed=SPEED;
}
differential_wheels_set_speed(left_speed,right_speed); /* Set the motor speeds */
robot_step(64); /* run one step */
}
return 0;
}
---------------------------------
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctionsfor all of your holiday gifts! |
|
From: Jason H. <jas...@bt...> - 2001-12-15 02:56:12
|
Why is your pop method wrong? I don't really understand why using a node
would be a problem. I assume that you are refering to the node pointer? The
only problem that I can see (at first look) is that initialize doesn't
delete any pointers that may be stored in the stack, but just discards them.
That would be a memory leak.
To use the stack all you need to do is declare an object of stacktype and
call it's members in the usual fasion.
//........... At top of code with other includes
#include "StackHeader.h"
//........... in code body
stacktype MyS;
// push some values onto stack
MyS.push(10);
for(int v = 0; v < 100; v += 5) MyS.push(v);
display(MyS);
add(MyS);
// pop off top value
int x = MyS.pop();
cout << "The value is: " << x << endl;
This code doesn't do anything in particular, it's just a demo.
If I have missed the point please try to explain in a little more detail.
Jason.
----- Original Message -----
From: "chromatonus 712" <chr...@ho...>
To: <dev...@li...>
Sent: Saturday, December 15, 2001 1:57 AM
Subject: [Dev-C++] linked list as stack
> hi, I was given the following header (can't change it, sorry) to write a
> calculator prgm using linked lists as stack (reverse polish notation or
> postfix)
>
> #include <iostream.h>
> #include <conio.h>
>
> struct node
> {
> int data;
> node *next;
> };
>
> class stacktype
> {
> public:
> // initial-value constructor
> stacktype( int );
> // postcondition: initialize list as STACK = NULL
> // top of stack will be the lead node
> // and will set screen row to initial value
> void initialize();
> // postcondition: object stack list is set to NULL
> // the screen display is cleared
> bool is_empty();
> // postcondition: return FALSE if stack = NULL otherwise
> // return TRUE
>
> void push( int );
> // postcondition: the entered data value will be placed at the HEAD
> // of the list, making it the TOP.
> // The second parameter is for the output to the screen
>
> int pop();
> // postcondition: the data at the HEAD (top) will be returned, and
the
> // head will be deleted from the list.
>
> private:
> node *mystack;
> int mytop, my_first_top;
> };
>
>
//==========================================================================
===
> //============================= Free functions
> ================================
>
//==========================================================================
===
> void draw_stack( int );
> // postcondition: draws stack using value from constructor as base value
> void add( stacktype & );
> // precondition: stack must have at least two elements.
> // postcondition: top two elements of stack are popped, added then pushed
> // back onto the stack
> // result will be displayed in output screen
> void subt( stacktype & );
> // precondition: stack must have at least two elements.
> // postcondition: top two elements of stack are popped, first one
> // subtracted from the second and the result
puched
> back
> // onto the stack
> // result will be displayed in output screen
> void mult( stacktype & );
> // precondition: stack must have at least two elements.
> // postcondition: top two elements of stack are popped, multiplied
> // together, and the product pushed back onto the stack
> // result will be displayed in output screen
> void display( stacktype );
> // postcondition: the top of the stack will be displayed in the output
> // screen. This wil be performed after each keystroke.
>
>
> :::::::This was part of what I wrote:
>
//==========================================================================
===
> //============================== Implementation
> ===============================
>
//==========================================================================
===
>
> stacktype::stacktype( int )
> {
> mystack = NULL;
> mytop = 0;
> my_first_top = 0;
> }
> void stacktype::initialize()
> {
> mystack = NULL;
> mytop = 0;
> my_first_top = 0;
> clrscr();
> //then it just displays a pretty picture
> int h, k;
> gotoxy(3,2);
> cout<< "> ";
> for(k=2; k<=22; k++)
> {
> gotoxy(60,k);
> cout<< "||";
> gotoxy(70,k);
> cout<< "||";
> }
> for(h=60; h<=71; h++)
> {
> gotoxy(h,21);
> cout<< "-";
> gotoxy(h,22);
> cout<< "-";
> }
> gotoxy(59,22);
> cout<< "-";
> gotoxy(72,22);
> cout<< "-";
> for(k=3; k<=20; k++)
> {
> for(h=62; h<=69; h++)
> {
> gotoxy(h,k);
> cout<< " ";
> }
> }
> gotoxy(50,10);
> cout<< "OUTPUT:";
> for(h=50; h<=56; h++)
> {
> gotoxy(h,11);
> cout<< "-";
> gotoxy(h,14);
> cout<< "-";
> }
> for(k=12; k<=13; k++)
> {
> gotoxy(49,k);
> cout<< "|";
> gotoxy(57,k);
> cout<< "|";
> }
> }
> bool stacktype::is_empty()
> {
> return (mystack == NULL);
> }
> void stacktype::push( int x )
> {
> mytop++;
> node *mm = new node;
> mm -> data = x;
> mm -> next = mystack;
> mystack = mm;
> gotoxy(62,21-mytop);
> cout<< x;
> gotoxy(50,13);
> cout<< x << " ";
> }
> int stacktype::pop()
> {
> gotoxy(62,20-mytop);
> cout<< " ";
> if( !is_empty() )
> {
> int x = mystack -> data;
> mytop--;
> node *j;
> j = mystack;
> mystack = mystack -> next;
> delete *j;
> gotoxy(50,13);
> cout<< x << " ";
> return x;
> }
> }
>
> my pop is wrong because i used nodes, but i don't know how to avoid the
> error, and how would you declare a stacktype using this header? thank you
> very much for your help :)
>
>
>
> _________________________________________________________________
> Join the world's largest e-mail service with MSN Hotmail.
> http://www.hotmail.com
>
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|
|
From: chromatonus 7. <chr...@ho...> - 2001-12-15 01:57:48
|
hi, I was given the following header (can't change it, sorry) to write a
calculator prgm using linked lists as stack (reverse polish notation or
postfix)
#include <iostream.h>
#include <conio.h>
struct node
{
int data;
node *next;
};
class stacktype
{
public:
// initial-value constructor
stacktype( int );
// postcondition: initialize list as STACK = NULL
// top of stack will be the lead node
// and will set screen row to initial value
void initialize();
// postcondition: object stack list is set to NULL
// the screen display is cleared
bool is_empty();
// postcondition: return FALSE if stack = NULL otherwise
// return TRUE
void push( int );
// postcondition: the entered data value will be placed at the HEAD
// of the list, making it the TOP.
// The second parameter is for the output to the screen
int pop();
// postcondition: the data at the HEAD (top) will be returned, and the
// head will be deleted from the list.
private:
node *mystack;
int mytop, my_first_top;
};
//=============================================================================
//============================= Free functions
================================
//=============================================================================
void draw_stack( int );
// postcondition: draws stack using value from constructor as base value
void add( stacktype & );
// precondition: stack must have at least two elements.
// postcondition: top two elements of stack are popped, added then pushed
// back onto the stack
// result will be displayed in output screen
void subt( stacktype & );
// precondition: stack must have at least two elements.
// postcondition: top two elements of stack are popped, first one
// subtracted from the second and the result puched
back
// onto the stack
// result will be displayed in output screen
void mult( stacktype & );
// precondition: stack must have at least two elements.
// postcondition: top two elements of stack are popped, multiplied
// together, and the product pushed back onto the stack
// result will be displayed in output screen
void display( stacktype );
// postcondition: the top of the stack will be displayed in the output
// screen. This wil be performed after each keystroke.
:::::::This was part of what I wrote:
//=============================================================================
//============================== Implementation
===============================
//=============================================================================
stacktype::stacktype( int )
{
mystack = NULL;
mytop = 0;
my_first_top = 0;
}
void stacktype::initialize()
{
mystack = NULL;
mytop = 0;
my_first_top = 0;
clrscr();
//then it just displays a pretty picture
int h, k;
gotoxy(3,2);
cout<< "> ";
for(k=2; k<=22; k++)
{
gotoxy(60,k);
cout<< "||";
gotoxy(70,k);
cout<< "||";
}
for(h=60; h<=71; h++)
{
gotoxy(h,21);
cout<< "-";
gotoxy(h,22);
cout<< "-";
}
gotoxy(59,22);
cout<< "-";
gotoxy(72,22);
cout<< "-";
for(k=3; k<=20; k++)
{
for(h=62; h<=69; h++)
{
gotoxy(h,k);
cout<< " ";
}
}
gotoxy(50,10);
cout<< "OUTPUT:";
for(h=50; h<=56; h++)
{
gotoxy(h,11);
cout<< "-";
gotoxy(h,14);
cout<< "-";
}
for(k=12; k<=13; k++)
{
gotoxy(49,k);
cout<< "|";
gotoxy(57,k);
cout<< "|";
}
}
bool stacktype::is_empty()
{
return (mystack == NULL);
}
void stacktype::push( int x )
{
mytop++;
node *mm = new node;
mm -> data = x;
mm -> next = mystack;
mystack = mm;
gotoxy(62,21-mytop);
cout<< x;
gotoxy(50,13);
cout<< x << " ";
}
int stacktype::pop()
{
gotoxy(62,20-mytop);
cout<< " ";
if( !is_empty() )
{
int x = mystack -> data;
mytop--;
node *j;
j = mystack;
mystack = mystack -> next;
delete *j;
gotoxy(50,13);
cout<< x << " ";
return x;
}
}
my pop is wrong because i used nodes, but i don't know how to avoid the
error, and how would you declare a stacktype using this header? thank you
very much for your help :)
_________________________________________________________________
Join the worlds largest e-mail service with MSN Hotmail.
http://www.hotmail.com
|
|
From: <jd...@da...> - 2001-12-12 22:25:32
|
Another problem: How can I create a library (.a) with DEV-Cpp? Somebody could tell me where I can find a tool which converts the .lib in .a ? Thanks a lot. |
|
From: Luigi S. <gi...@li...> - 2001-12-12 09:29:28
|
Hi
Here I'll attempt to give you a possible explanation of the error messages
that you get.
I hope to make my explanation clearer by writing a trivial version of your
program.
dynarray.hpp dynarray.cpp
------------------------- -------------------------
#ifndef dynarray_hpp #include "dynarray.hpp"
#define dynarray_hpp ////////////////////////////
DynArray::DynArray(int size)
class DynArray {
{ n = size;
int n; // size p = new double[n];
double *p; // memory }
public: ////////////////////////////
DynArray(int); DynArray::~DynArray()
~DynArray(); {
} delete[] p;
#endif }
------------------------- -------------------------
main.cpp
-------------------------
#include "dynarray.hpp"
int
main()
{
DynArray a(3);
...
}
dynarray.hpp is an header file, it will be included, by a source file, when
the class DynArray is used by code placed in the source file (in fact it is
included by dynarray.cpp that defines the functions of the class and by
main.cpp that uses the class).
Probably your version of the class DynArray looks like this:
dynarray.hpp dynarray.cpp
------------------------- -------------------------
#ifndef dynarray_hpp #include "dynarray.hpp"
#define dynarray_hpp ////////////////////////////
DynArray::~DynArray()
class DynArray {
{ delete[] p;
int n; // size }
double *p; // memory -------------------------
public:
DynArray(int);
~DynArray();
}
#endif
////////////////////////////
DynArray::DynArray(int size)
{
n = size;
p = new double[n];
}
-------------------------
As you can see, in this case a definition of the constructor is found in
all the files that include the header file; in your program that means: one
definition in dynarray.cpp and one in main.cpp.
If you only compile the source files, you will get no error, the problem
arises when you attempt to build the binary file, in fact the linker will
find 2 definitions of the constructor: one in the object file created
compiling dynarray.cpp (dynarray.o) and one in the object file created from
main.cpp (main.o), since it knows that there must be only one definition,
it will point out the error.
A way to avoid the error, still keeping the definition of the constructor
in the header file, is to turn the constructor in an inline function: I
prefer to do so by placing the definition inside the class declaration,
instead of using the "inline" reserved word (but that is a question of
taste); so I would have written:
dynarray.hpp dynarray.cpp
------------------------- -------------------------
#ifndef dynarray_hpp #include "dynarray.hpp"
#define dynarray_hpp ////////////////////////////
DynArray::~DynArray()
class DynArray {
{ delete[] p;
int n; // size }
double *p; // memory -------------------------
public:
DynArray(int size)
{ n = size; p = new double[size]; }
~DynArray();
}
#endif
-------------------------
I hope the above helps.
At 10.38 09/12/01 -0500, Danny wrote:
>Hello again,
>I have managed to make some progress, only to run into larger problems.
>After including the files in one project and compiling, the Linker returns a
>long list of complaints:
>
>
>c:\cpp\array1\dynarray.o: In function `_8DynArrayi':
>file://file://c/cpp/array1/dynarray.cpp:25: multiple definition of
>`DynArray::DynArray(int)'
>c:\cpp\array1\main.o://C/cpp/array1/dynarray.cpp:25: first defined here
>c:\cpp\array1\dynarray.o: In function `_8DynArrayRC8DynArray':
>file://c/cpp/array1/dynarray.cpp:41: multiple definition of
>`DynArray::DynArray(DynArray const &)'
>c:\cpp\array1\main.o://C/cpp/array1/dynarray.cpp:41: first defined here
>
>
>It seems that I get this type of complaint for each function in the
>implementation file. What is the cause of this? Any ideas on what to do to
>solve this problem?
> ...
>
>Danny
--
gisan
gi...@li...
|
|
From: mak <ma...@pu...> - 2001-12-11 23:35:56
|
this is how to create a binary file in c(of course you can use it in c++)
#include <stdio.h>
FILE * filenum; //pointer to file
filenum=fopen("External file name","mode")
mode:r,w or a, read write,or appending
right after r,w or a type 'b' to open the file as binary
for example to create a binary file called my.dat write
FILE * f1;
f1=fopen("my.dat ","wb");
now to read and write to the file,you will use the functions
fread(buffer,siz,num,filenum);
which will read num values(of size siz) from the filenum file and store it
in the proper array named buffer.if a zero value is returned it means that
you have come to the end of the file.
to write you will use
fwrite(buffer,siz,num,filenum);
as above except that if the function returns the number of values written
to the file.
to seek values in the file use the function
fseek(filenum,(long)no_bytes,position);
the internal acces pointer of the file filenum will move no_bytes from
position.
position:0 start of file
1:current position
2:end of file
that's all. hope that helped
_____________________________________________
Free email with personality! Over 200 domains!
http://www.MyOwnEmail.com
|
|
From: Ramana K. <ra...@my...> - 2001-12-11 22:38:15
|
I know how to save to binary, which doesn't look like text if opened in
notepad or something:
#include <fstream.h>
...
int anumber = 17;
char letters[7] = "hello!";
ofstream fout("path of file");
fout.write((char*) &anumber, sizeof anumber);
fout.write((char*) &letters, sizeof letters);
fout.close()
//to retrieve data
ifstream fin("path of file");
int savednumber;
fin.read((char*) &savednumber, sizeof savednumber);
...
that's the basic principle for it, it worked for me, and some things might
not be necessary (like the (char*) for letters), I'm not sure, but including
it shouldn't hurt.
You also might need to include stdlib.h if it doesn't work
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...]On Behalf Of Ian Weston
Sent: mercredi 12 décembre 2001 04:18
To: Dev...@li...
Subject: [Dev-C++] creating files
hello, i was just wondering if anyone can help me. i want to be able to save
int's to a file and maybe even chars's. the thing is i don't want it to be
in text. so does anyone know how to save it as a binary file or what have
you.
thankyou.
ian
_________________________________________________________________
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: Exuss D. <dra...@ce...> - 2001-12-11 18:53:40
|
Hi, Thanx for all, who helped me with strcpy() :) Bye! Exuss -- Nemokama el.pašto dėžutė - http://webmail.delfi.lt/ |
|
From: Ian W. <lak...@ho...> - 2001-12-11 17:17:56
|
hello, i was just wondering if anyone can help me. i want to be able to save int's to a file and maybe even chars's. the thing is i don't want it to be in text. so does anyone know how to save it as a binary file or what have you. thankyou. ian _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp |
|
From: Nirmit K. <nir...@ho...> - 2001-12-11 14:48:17
|
RESPECTED SIR/ MADAM, Please remove me from the mailing list coz of some reasons which are unexplanatory. Please take this e-mail seriously and remove me from the mailing list. Nirmit Kumar _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp |
|
From: Ben C. <cra...@ya...> - 2001-12-11 14:26:36
|
Hi list, I'm new here, but I have one question, when you get Dev-C++ to create a DLL for you, how do you use it? I want to pass information from a MapBasic program to a C++ DLL. Now that I've created the DLL in c++ and can call it from MapBasic where do I put the code that I want it use on the incoming data? Sounds like stupid question but I'm very new to DLL's and am trying to get a test version to work. I want to send a number to the c++ dll and mess with it, then return it for output in mapbasic. Any/all help would be great. If a dll is the wrong method for doing this, anyone know how else I can pass a value, or values(array) to a c++ program to alter/mess with it? Thanx Ben __________________________________________________ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com |
|
From: Jazzboy <Ja...@pa...> - 2001-12-11 12:51:31
|
Hi , I find dev-cpp a good program ,but I've been unaible to use the debugger = of it.=20 Can somebody give me an example of how I could use it, because the help = files don't help me. Thank You |
|
From: Jazzboy <Ja...@pa...> - 2001-12-11 12:45:55
|
There is a simple fuctie from C atof(char) that converts a char to a = float You have the same kind of function but atoi(char) that converts a char = to an int |
|
From: Anders N. <a.n...@de...> - 2001-12-11 06:24:47
|
Thanks for the help about the length of AnsiString. Yes, I ment the = AnsiString in C++Builder. /Anders |
|
From: Kevin W. <ke...@me...> - 2001-12-11 00:54:34
|
Are you talking about a Borland-type Ansi String?
For that you use
book.Length();
Kev.
----- Original Message -----
From: Anders Nilsson <a.n...@de...>
To: <dev...@li...>
Sent: Monday, December 10, 2001 1:20 PM
Subject: [Dev-C++] Length of AnsiString
Hello!
I create an AnsiString and "fill" it with a text.
Code:
AnsiString book;
book = EditText->Text;
How can I find out the length of the string book?
/Anders
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|
|
From: Kevin W. <ke...@me...> - 2001-12-11 00:54:33
|
Quite right, my mistake. It needs a char pointer
Kev.
----- Original Message -----
From: David Nebinger <dne...@mi...>
To: Kevin Wood <ke...@me...>
Sent: Sunday, December 09, 2001 11:13 PM
Subject: Re: [Dev-C++] how do you convert char to int?
> That won't work. '7' is a char, atoi takes a string. Either atoi("7") or
> ('7' - '0').
>
> ----- Original Message -----
> From: "Kevin Wood" <ke...@me...>
> To: <dev...@li...>
> Sent: Sunday, December 09, 2001 5:09 PM
> Subject: Re: [Dev-C++] how do you convert char to int?
>
>
> > I would use
> >
> > #include <stdlib.h>
> > int MyInt=atoi('7');
> >
> > Kev.
> >
> >
> > ----- Original Message -----
> > From: chromatonus 712 <chr...@ho...>
> > To: <dev...@li...>
> > Sent: Sunday, December 09, 2001 8:56 PM
> > Subject: [Dev-C++] how do you convert char to int?
> >
> >
> > > so if you enter 7 as char, for example, how do you convert it to the
> > number
> > > 7?
> > >
> > > _________________________________________________________________
> > > 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
> > >
> >
> >
> > _______________________________________________
> > Dev-cpp-users mailing list
> > Dev...@li...
> > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
>
|
|
From: Ricardo R. <ri...@po...> - 2001-12-10 14:35:18
|
***************************************** solution to assign a value to a char-array: #include <string.h> char myValue[20]; ................ strcpy ( myValue , "New Value") ; ..................................... ************************************** |
|
From: Daniel G. <sp...@ho...> - 2001-12-10 13:41:25
|
<html><div style='background-color:'><DIV> <P>I think you use StrLen() but I'm not sure. Someone else might know for sure :)<BR><BR></P></DIV> <DIV></DIV> <DIV></DIV>>From: "Anders Nilsson" <A.N...@DE...> <DIV></DIV>>To: <DEV...@LI...> <DIV></DIV>>Subject: [Dev-C++] Length of AnsiString <DIV></DIV>>Date: Mon, 10 Dec 2001 14:20:42 +0100 <DIV></DIV>> <DIV></DIV>>Hello! <DIV></DIV>> <DIV></DIV>>I create an AnsiString and "fill" it with a text. <DIV></DIV>> <DIV></DIV>>Code: <DIV></DIV>> AnsiString book; <DIV></DIV>> book = EditText->Text; <DIV></DIV>> <DIV></DIV>>How can I find out the length of the string book? <DIV></DIV>> <DIV></DIV>>/Anders <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>Get your FREE download of MSN Explorer at <a href='http://go.msn.com/bql/hmtag_itl_EN.asp'>http://explorer.msn.com</a><br></html> |