dev-cpp-users Mailing List for Dev-C++ (Page 640)
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: Anders N. <a.n...@de...> - 2001-12-10 13:21:38
|
Hello!
I create an AnsiString and "fill" it with a text.
Code:
AnsiString book;
book =3D EditText->Text;
How can I find out the length of the string book?
/Anders
|
|
From: Joost v. R. <jo...@va...> - 2001-12-10 13:20:17
|
Hello,
I am a newbie and I ran in to the following problem using dev-c++ while
trying to create a util for Win32. Amongst other things it should create a
drive mapping.
I used the the following code:
#include <stdio.h>
#include <windows.h>
#include <winnetwk.h>
int main(int argc, char *argv[])
{
WNetAddConnection("\\\\server\\c$", "", "Q:");
WNetAddConnection("\\\\server\\d$", "", "R:");
return 0;
}
But when I try to compile it I get the following linker error:"
e:\src\mappings\main.o(.text+0x6a):main.cpp: undefined reference to
`WNetAddConnectionA@12'
e:\src\mappings\main.o(.text+0x84):main.cpp: undefined reference to
`WNetAddConnectionA@12'
I checked for the winnetwk.h file and it is there. But there is no mpr.lib
After that I tried to use the mpr.lib from Microsofts VC and set the
library location in the compileroptions to it but that did not create a
different output at all...
I don't know what to do anymore. Can anyone help me?
grtz
Joost van Rooij
|
|
From: dx F. <vin...@ed...> - 2001-12-10 12:35:34
|
Ive seen it before... and now I want to know how exactly that works. Some applications draw bitmaps on the screen, with part of it transparent... either completely or not. These programs can actually draw(paint) a bitmap with a transparency color! All they have to do is replace a specific color into a transparent color and then voom! you can see your wall paper right through the interior of the window. Does anyone know how I can do this? For example... we take a square, or any shape drawn in a bitmap file. The square (or any shape) is colored blue and its background red. How will I be able to draw the square (or any shape) on the screen whithout actually drawing the red background of the bitmap? __________________________________ www.edsamail.com |
|
From: Daniel A. <bt...@ca...> - 2001-12-10 02:33:37
|
One way to do this is to use a bit mask- the ascii code for 7 is 011 0111, while the number 7 in bin is 000 0111. I am pressed for time, but send me a message and I will respond in more detail. D. |
|
From: Jason H. <jas...@bt...> - 2001-12-09 23:08:50
|
A couple of notes, atoi() works on a string, so you would have to ensure
that a terminator after the char is there. It doesn't have to be a null
though, because atoi() stops when it reaches a non-numerical character, i.e.
whitespace, letter, etc... Another way of doing it is:
static_cast<int>(MyInt -'0');
which relies on the ascii values of a character and the fact that 0 through
9 are in order. You would have to check that the values are actualy number
characters before using them of course. Also this only works on a single
character and not a value that is larger than 9, although it can be used as
the basis of creating your own atoi() style function.
Jason.
----- Original Message -----
From: "Kevin Wood" <ke...@me...>
To: <dev...@li...>
Sent: Sunday, December 09, 2001 10: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: Horst R. <hr...@un...> - 2001-12-09 23:05:18
|
Hello, I'm a beginner with Dev-cpp ( not with C++ at all ). Now I'm looking for a gui toolkit, found some of it (fltk, V ...) but I'm unable to decide witch is the best for me. Are there any hints ? Thanks Horst |
|
From: Kevin W. <ke...@me...> - 2001-12-09 22:17:58
|
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
>
|
|
From: chromatonus 7. <chr...@ho...> - 2001-12-09 20:56:20
|
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 |
|
From: Daniel G. <sp...@ho...> - 2001-12-09 16:49:57
|
<html><div style='background-color:'><DIV> <P>are you #including the same file several times or something?<BR><BR></P></DIV> <DIV></DIV> <DIV></DIV>>From: "Daniel Anderson" <BT...@CA...> <DIV></DIV>>To: <DEV...@LI...> <DIV></DIV>>Subject: [Dev-C++] more problems compiling classes and libraries <DIV></DIV>>Date: Sun, 9 Dec 2001 10:38:02 -0500 <DIV></DIV>> <DIV></DIV>>Hello again, <DIV></DIV>>I have managed to make some progress, only to run into larger problems. <DIV></DIV>>After including the files in one project and compiling, the Linker returns a <DIV></DIV>>long list of complaints: <DIV></DIV>> <DIV></DIV>> <DIV></DIV>>c:\cpp\array1\dynarray.o: In function `_8DynArrayi': <DIV></DIV>>file://file://c/cpp/array1/dynarray.cpp:25: multiple definition of <DIV></DIV>>`DynArray::DynArray(int)' <DIV></DIV>>c:\cpp\array1\main.o://C/cpp/array1/dynarray.cpp:25: first defined here <DIV></DIV>>c:\cpp\array1\dynarray.o: In function `_8DynArrayRC8DynArray': <DIV></DIV>>file://c/cpp/array1/dynarray.cpp:41: multiple definition of <DIV></DIV>>`DynArray::DynArray(DynArray const &)' <DIV></DIV>>c:\cpp\array1\main.o://C/cpp/array1/dynarray.cpp:41: first defined here <DIV></DIV>> <DIV></DIV>> <DIV></DIV>>It seems that I get this type of complaint for each function in the <DIV></DIV>>implementation file. What is the cause of this? Any ideas on what to do to <DIV></DIV>>solve this problem? <DIV></DIV>> <DIV></DIV>>Thanks- not only for any information on this problem, but on the invaluable <DIV></DIV>>help given on my previous questions. <DIV></DIV>> <DIV></DIV>>Danny <DIV></DIV>> <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> |
|
From: Daniel A. <bt...@ca...> - 2001-12-09 16:09:37
|
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? Thanks- not only for any information on this problem, but on the invaluable help given on my previous questions. Danny |
|
From: Jason H. <jas...@bt...> - 2001-12-09 01:50:59
|
Hi again.
I've had a quick look at what you are doing and have found what I think is
the source of your main problem although there are a few other things that
probably need tweeking, but I think you can do that for yourself. Do you
remember what I said about passing an object as a parameter makes a copy of
that object and doesn't affect the original? That is what is stopping your
function from working. In this case the value that you want to push back
onto the stack needs to be done to the original, but you are putting it in a
copy that is destroyed at the end of the function call. There are two ways
around it, pass the stack as a reference, or pass a pointer to the stack and
work with that.
As you can guess I'm working on a rewritten version (just for fun), but it's
not finished yet.
Keep on trying. You may want to look at the way you are entering your data
as you seem to be mangleing the values a little, although I'm not sure,
maybe it works?
I hope that this helps. I'll try to help you any way I can if you need it in
future.
Jason.
----- Original Message -----
From: "chromatonus 712" <chr...@ho...>
To: <dev...@li...>
Sent: Saturday, December 08, 2001 10:51 PM
Subject: [Dev-C++] reverse polish notation
> hi, my stack works, (thanks to Mr. Hardman,) but i am now trying to create
a
> calculator: type in digits 0~9 in one line, like this: 123, for example.
> Then if you type in '+', then the prgm pushes the top two # out of stack,
> add them, and pop it back in. So 2 and 3 would be added and 5 is popped in
> on top of 1. same for '*' and '-'. if '=' is typed then the top element of
> the stack is displayed on the screen (like the answer).
>
> i have to make sure that all the input chars be on one line but not
> overlapping, and that my add, subtract and mult. functions work (they
> don't.)
>
> notes: 'q' quits the program and 'i' clears everything on the screen
except
> the > prompt.
>
> thank you for your help : )
>
> #include <iostream.h>
> #include <conio.h>
> #include <stdlib.h>
>
> int const max_stack = 100;
>
> class stacktype
> {
> public:
> stacktype();
> // default constructor
> // postcondition: initializes stack by setting TOP = 0
> void initialize();
> // postcondition: erase stack by setting TOP = 0
> void push( int );
> // postcondition: If the stack is not full,
> // increase TOP by 1 , then
> // put info into DATA[TOP]
> int pop();
> // postcondition: If the stack is not empty,
> // put DATA[TOP] into x,
> // decrease TOP by 1,
> // return x
> bool is_empty();
> // postcondition: Return true if stack is empty, false otherwise.
> bool is_full();
> // postcondition: Return true if stack is full, false otherwise.
> private:
> int mydata[max_stack];
> int mytop; // subscript of the top of the stack
> };
>
>
>
//==========================================================================
====
> //============================== Free functions
> ================================
>
//==========================================================================
====
>
> void a_two( stacktype );
> // precondition: send in stack
> // postcondition: new stack formed with top element = sum of top 2
> elements
> // of old stack
>
> void s_two( stacktype );
> // precondition: send in stack
> // postcondition: new stack formed with top element = difference of top
2
> // elements of old stack
>
> void m_two( stacktype );
> // precondition:
> // postcondition:
>
> void display_top( stacktype );
> // precondition: send in stack
> // postcondition: display, without destruction, the value in data[top]
>
>
//==========================================================================
====
> //============================== Implementation
> ================================
>
//==========================================================================
====
>
> stacktype::stacktype()
> {
> mytop = 0;
> }
> void stacktype::initialize()
> {
> mytop = 0;
> clrscr();
> gotoxy(3,3);
> cout<< "> ";
> }
> bool stacktype::is_empty()
> {
> return (mytop == 0);
> }
> bool stacktype::is_full()
> {
> return (mytop == max_stack-1);
> }
> void stacktype::push( int x )
> {
> if( !is_full() )
> {
> mytop++;
> mydata[mytop] = x;
> }
> }
> int stacktype::pop()
> {
> if( !is_empty() )
> {
> int x = mydata[mytop];
> mytop--;
> return x;
> }
> }
>
>
>
//==========================================================================
====
> //============================== Client Program
> ================================
>
//==========================================================================
====
>
> int main()
> {
> int c = 3;
> stacktype S;
> char z;
> gotoxy(3,3);
> cout<< "> ";
> c = 5;
> while( z != 'Q' && z != 'q' )
> {
> gotoxy(c,3);
> cin>> z;
> switch( z )
> {
> case 'I':
> case 'i': S.initialize();
> break;
>
> case '+': a_two(S);
>
> break;
>
> case '-': s_two(S);
>
> break;
>
> case '*': m_two(S);
>
> break;
>
> case '=': display_top(S);
>
> break;
>
> case '0':
> case '1':
> case '2':
> case '3':
> case '4':
> case '5':
> case '6':
> case '7':
> case '8':
> case '9': z = getche();
> int j = z;
> S.push( j );
> break;
>
> }
> c++;
> z = getche();
> }
> }
>
> void a_two( stacktype S )
> {
> int p = S.pop();
> int q = S.pop();
> S.push( p+q );
> }
>
> void s_two( stacktype S )
> {
> int p = S.pop();
> int q = S.pop();
> S.push( p-q );
> }
>
> void m_two( stacktype S )
> {
> int p = S.pop();
> int q = S.pop();
> S.push( p*q );
> }
>
> void display_top( stacktype S )
> {
> int t = S.pop();
> cout<< t;
> S.push(t);
> }
>
>
>
>
>
>
>
>
> _________________________________________________________________
> 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: chromatonus 7. <chr...@ho...> - 2001-12-08 22:52:08
|
hi, my stack works, (thanks to Mr. Hardman,) but i am now trying to create a
calculator: type in digits 0~9 in one line, like this: 123, for example.
Then if you type in '+', then the prgm pushes the top two # out of stack,
add them, and pop it back in. So 2 and 3 would be added and 5 is popped in
on top of 1. same for '*' and '-'. if '=' is typed then the top element of
the stack is displayed on the screen (like the answer).
i have to make sure that all the input chars be on one line but not
overlapping, and that my add, subtract and mult. functions work (they
don't.)
notes: 'q' quits the program and 'i' clears everything on the screen except
the > prompt.
thank you for your help : )
#include <iostream.h>
#include <conio.h>
#include <stdlib.h>
int const max_stack = 100;
class stacktype
{
public:
stacktype();
// default constructor
// postcondition: initializes stack by setting TOP = 0
void initialize();
// postcondition: erase stack by setting TOP = 0
void push( int );
// postcondition: If the stack is not full,
// increase TOP by 1 , then
// put info into DATA[TOP]
int pop();
// postcondition: If the stack is not empty,
// put DATA[TOP] into x,
// decrease TOP by 1,
// return x
bool is_empty();
// postcondition: Return true if stack is empty, false otherwise.
bool is_full();
// postcondition: Return true if stack is full, false otherwise.
private:
int mydata[max_stack];
int mytop; // subscript of the top of the stack
};
//==============================================================================
//============================== Free functions
================================
//==============================================================================
void a_two( stacktype );
// precondition: send in stack
// postcondition: new stack formed with top element = sum of top 2
elements
// of old stack
void s_two( stacktype );
// precondition: send in stack
// postcondition: new stack formed with top element = difference of top 2
// elements of old stack
void m_two( stacktype );
// precondition:
// postcondition:
void display_top( stacktype );
// precondition: send in stack
// postcondition: display, without destruction, the value in data[top]
//==============================================================================
//============================== Implementation
================================
//==============================================================================
stacktype::stacktype()
{
mytop = 0;
}
void stacktype::initialize()
{
mytop = 0;
clrscr();
gotoxy(3,3);
cout<< "> ";
}
bool stacktype::is_empty()
{
return (mytop == 0);
}
bool stacktype::is_full()
{
return (mytop == max_stack-1);
}
void stacktype::push( int x )
{
if( !is_full() )
{
mytop++;
mydata[mytop] = x;
}
}
int stacktype::pop()
{
if( !is_empty() )
{
int x = mydata[mytop];
mytop--;
return x;
}
}
//==============================================================================
//============================== Client Program
================================
//==============================================================================
int main()
{
int c = 3;
stacktype S;
char z;
gotoxy(3,3);
cout<< "> ";
c = 5;
while( z != 'Q' && z != 'q' )
{
gotoxy(c,3);
cin>> z;
switch( z )
{
case 'I':
case 'i': S.initialize();
break;
case '+': a_two(S);
break;
case '-': s_two(S);
break;
case '*': m_two(S);
break;
case '=': display_top(S);
break;
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9': z = getche();
int j = z;
S.push( j );
break;
}
c++;
z = getche();
}
}
void a_two( stacktype S )
{
int p = S.pop();
int q = S.pop();
S.push( p+q );
}
void s_two( stacktype S )
{
int p = S.pop();
int q = S.pop();
S.push( p-q );
}
void m_two( stacktype S )
{
int p = S.pop();
int q = S.pop();
S.push( p*q );
}
void display_top( stacktype S )
{
int t = S.pop();
cout<< t;
S.push(t);
}
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
|
|
From: Guido E. <gu...@ge...> - 2001-12-08 21:15:19
|
The Old Wolf schrieb: > I've looked around the email and forum sites and couldn't > find an answer to either of the following. (If I've missed it, > just point me in the right direction, please!) > 1 has anyone been able to get the free Windows version > of Qt to link? If so, is there a doc I can get ahold of > explaining it? Sorry, but the Trolltechs say at their website: --- The Qt Non Commercial Edition for Microsoft Windows is a binary only distribution requiring Microsoft Visual Studio version 6. We have no plans to support other compilers, but we may do so in the future. The Professional and Enterprise Editions include full source code and support several compilers. --- (To be found at http://www.trolltech.com/developer/download/qt-win-noncomm.html ) - Guido |
|
From: Ioannis V. <no...@ya...> - 2001-12-08 15:13:13
|
With strcpy() defined in <cstring>, and <string.h>. But better use the
string type defined in <string>. For example:
#include <iostream>
#include <string>
int main()
{
using namespace std;
string a="This is";
string b=" a string\n";
string c;
c=a+b; // c=="This is a string\n"
a+=b; // a=="This is a string\n"
cout<<a<<c;
}
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.f2s.com
* Alternative URL: http://run.to/noicys
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...] On Behalf
> Of Exuss Draugas
> Sent: Friday, December 07, 2001 7:58 PM
> To: Dev...@li...
> Subject: [Dev-C++] Array of char
>
>
>
>
> Hi All!
>
> Just a simple question. How to assing a value to array of char?
>
> char myValue[20] = "Some text!";
> cout << myValue << endl;
>
> // This is don't work :((
> myValue="New text";
>
> Works only: cin >> myValue;
>
> Thanks,
>
> Exuss
>
>
>
>
>
>
> --
> Nemokama el.pasto dezute - http://webmail.delfi.lt/
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|
|
From: The O. W. <ka...@po...> - 2001-12-08 03:29:58
|
I've looked around the email and forum sites and couldn't find an answer to either of the following. (If I've missed it, just point me in the right direction, please!) 1 has anyone been able to get the free Windows version of Qt to link? If so, is there a doc I can get ahold of explaining it? 2 The getopt function does not seem to be in the unistd.h headers (or anywhere else in the basic include directories) is there one? Or even a quick clone I can swipe? Thanks for your time! Dan |
|
From: Kevin W. <ke...@me...> - 2001-12-07 21:55:26
|
From Kevin Wood ----------------------------
You can use
char MyValue[20]=3D{"Some text!"};
if you want to initialise the array on creation (you can't do this =
later).
Otherwise do
strcpy(MyValue, "Some text");
and make sure there is room in the array for all the characters plus the =
terminating null.=20
=20
----- Original Message -----=20
From: Exuss Draugas <dra...@ce...>
To: <Dev...@li...>
Sent: Friday, December 07, 2001 5:58 PM
Subject: [Dev-C++] Array of char
>=20
>=20
> Hi All!
>=20
> Just a simple question. How to assing a value to array of char?
> =20
> char myValue[20] =3D "Some text!";
> cout << myValue << endl;
>=20
> // This is don't work :((
> myValue=3D"New text";
> =20
> Works only: cin >> myValue;
>=20
> Thanks,
>=20
> Exuss
>=20
>=20
>=20
>=20
>=20
>=20
> --
> Nemokama el.pa=F0to d=EB=FEut=EB - http://webmail.delfi.lt/
>=20
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>=20
|
|
From: carlos D. M. <cg...@wo...> - 2001-12-07 18:36:12
|
Exuss Draugas escribió: > Hi All! > > Just a simple question. How to assing a value to array of char? > > char myValue[20] = "Some text!"; > cout << myValue << endl; > > // This is don't work :(( > myValue="New text"; > > Works only: cin >> myValue; > > Thanks, > > Exuss > > -- > Nemokama el.paðto dëþutë - http://webmail.delfi.lt/ > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users Use strcpy(myvalue, "Some text"); This pass the second value to the first variable. And this works with spaces. If the second is "Hello marvellous world", myvalue will be the whole phrase, not only the first word. cin >>myvalue; would put in myvalue "Hello", only. Then, for input from keyboard you need use cin.getline(char array, size of the char array); cin.getline(myValue, 20); **input: Hello baby** will put in myValue "Hello baby". |
|
From: Exuss D. <dra...@ce...> - 2001-12-07 16:58:29
|
Hi All! Just a simple question. How to assing a value to array of char? char myValue[20] = "Some text!"; cout << myValue << endl; // This is don't work :(( myValue="New text"; Works only: cin >> myValue; Thanks, Exuss -- Nemokama el.pašto dėžutė - http://webmail.delfi.lt/ |
|
From: Nexus <nne...@ya...> - 2001-12-07 15:55:34
|
Yep it works congratis
Nexus
--- dx FX <vin...@ed...> wrote:
> After many hours of programming... I've finally
> found the solution! I have experimented with many
> styles and now I have a working code, ready to be
> used in one of my programs I am currently writing.
> Below is a copy of the test program code. The new
> function, IsAppWindow(HWND) tells if the window the
> handle points to is an Application window in the
> taskbar:
>
> #include <string>
> #include <windows.h>
> #include <iostream.h>
>
> // using namespace std;
>
> BOOL IsAppWindow(HWND);
>
> int i = 0;
>
> BOOL CALLBACK AppGetWindows(HWND hwnd, LPARAM
> lParam) {
> string str2;
> LPSTR LPString;
> LPString = new(CHAR);
>
> if (IsAppWindow(hwnd))
> {
> i = i + 1;
> if (GetWindowText(hwnd, LPString ,19) > 0) {
> cout << i << ":" << LPString << endl;
> }
> }
>
> return true;
> delete LPString;
> LPString = 0;
> }
>
> BOOL IsAppWindow(HWND hWnd)
> {
> BOOL bResult = TRUE;
> LONG nStyle;
> HWND hOwner;
> HWND hParent;
>
> // if it is a WS_CHILD or not WS_VISIBLE, fail it
> nStyle = GetWindowLong(hWnd, GWL_STYLE);
> if((nStyle & WS_CHILD) || !(nStyle & WS_VISIBLE))
> bResult = FALSE;
>
> // if the window is a WS_EX_TOOLWINDOW fail it
> nStyle = GetWindowLong(hWnd, GWL_EXSTYLE);
> if(nStyle & WS_EX_TOOLWINDOW)
> bResult = FALSE;
>
> // If this has an owner, then only accept this
> window
> // if the parent is not accepted
> hOwner = GetWindow(hWnd, GW_OWNER);
> if(hOwner && bResult)
> bResult = !IsAppWindow(hOwner);
>
> // if it has a parent, fail
> hParent = GetParent(hWnd);
> if(hParent)
> bResult = FALSE;
>
> return bResult;
> }
>
> int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE
> hPrevInstance, LPSTR lpCmdLine, int cmdShow) {
>
> if (EnumWindows(*AppGetWindows, 0)) {
> cout << endl << i << " Total Windows" << endl;
> } else {
> cout << "EnumWindows Failed /n" << endl;
> }
>
> system("PAUSE");
> }
>
> At first I didn't really know where I could start
> writing the function. But thanks to some advice to
> you folks, I now have this little test code. The
> program now outputs not only the number of windows
> but also the titles of the windows.
>
> Guys! all ya Folks! Thanks!!!!
>
> __________________________________
> www.edsamail.com
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
>
https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
=====
Nexus
Nanomage.com
http://www.nanomage.com
__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com
|
|
From: http//:angelfire.com/dc/85 Sale's <bc...@ms...> - 2001-12-07 14:39:39
|
Hi I know all about html.Go to my website,I have that mastered very well. http://angelfire.com/dc/85 In c++ or visual basic i need to know how to use other project.how ot combine them. THank You >From: Mansoor Nathani <man...@sy...> >To: "http//:angelfire.com/dc/85 Sale's" <bc...@ms...> >Subject: Re: [Dev-C++] making a link? >Date: Thu, 06 Dec 2001 16:13:15 -0500 > >hi.. I think what you need to do is go to a website that teaches HTML.. > >www.webmonkey.com > >is one of them. > >MANSOOR > >"http//:angelfire.com/dc/85 Sale's" wrote: > > > how do i put a link in a program so people cvan see a different page i > > made?in devc++ or visual basic? > > PLease help > > please go to my website > > http://angelfire.com/dc/85 > > Thank You in advnce > > > > _________________________________________________________________ > > 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 > _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp |
|
From: dx F. <vin...@ed...> - 2001-12-07 09:14:37
|
After many hours of programming... I've finally found the solution! I have experimented with many styles and now I have a working code, ready to be used in one of my programs I am currently writing. Below is a copy of the test program code. The new function, IsAppWindow(HWND) tells if the window the handle points to is an Application window in the taskbar:
#include <string>
#include <windows.h>
#include <iostream.h>
// using namespace std;
BOOL IsAppWindow(HWND);
int i = 0;
BOOL CALLBACK AppGetWindows(HWND hwnd, LPARAM lParam) {
string str2;
LPSTR LPString;
LPString = new(CHAR);
if (IsAppWindow(hwnd))
{
i = i + 1;
if (GetWindowText(hwnd, LPString ,19) > 0) {
cout << i << ":" << LPString << endl;
}
}
return true;
delete LPString;
LPString = 0;
}
BOOL IsAppWindow(HWND hWnd)
{
BOOL bResult = TRUE;
LONG nStyle;
HWND hOwner;
HWND hParent;
// if it is a WS_CHILD or not WS_VISIBLE, fail it
nStyle = GetWindowLong(hWnd, GWL_STYLE);
if((nStyle & WS_CHILD) || !(nStyle & WS_VISIBLE))
bResult = FALSE;
// if the window is a WS_EX_TOOLWINDOW fail it
nStyle = GetWindowLong(hWnd, GWL_EXSTYLE);
if(nStyle & WS_EX_TOOLWINDOW)
bResult = FALSE;
// If this has an owner, then only accept this window
// if the parent is not accepted
hOwner = GetWindow(hWnd, GW_OWNER);
if(hOwner && bResult)
bResult = !IsAppWindow(hOwner);
// if it has a parent, fail
hParent = GetParent(hWnd);
if(hParent)
bResult = FALSE;
return bResult;
}
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int cmdShow) {
if (EnumWindows(*AppGetWindows, 0)) {
cout << endl << i << " Total Windows" << endl;
} else {
cout << "EnumWindows Failed /n" << endl;
}
system("PAUSE");
}
At first I didn't really know where I could start writing the function. But thanks to some advice to you folks, I now have this little test code. The program now outputs not only the number of windows but also the titles of the windows.
Guys! all ya Folks! Thanks!!!!
__________________________________
www.edsamail.com
|
|
From: http//:angelfire.com/dc/85 Sale's <bc...@ms...> - 2001-12-06 16:27:40
|
how do i put a link in a program so people cvan see a different page i made?in devc++ or visual basic? PLease help please go to my website http://angelfire.com/dc/85 Thank You in advnce _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp |
|
From: Mike M. <mc...@ms...> - 2001-12-06 15:30:51
|
You should just be able to write a simple hello world program to show
otuput....
Try this (start a new console C++ project, remove all the provided source
code) :
#include <stdio.h> // for your printf
#include <conio.h> // for system()
int main()
{
printf("Hello World\n");
system("pause"); // keeps the console open so you
// can see the results
return 0;
}
That would do it.
Later,
Mike
>From: J.S...@t-... (J.Schwarzbach)
>Reply-To: <320...@T-...>
>To: <dev...@li...>
>Subject: [Dev-C++] printf
>Date: 06 Dec 2001 14:17 GMT
>
>Till now, I worked only with DOS-Compilers. (only C, not C++)
>But with this compiler I cannot see output, when I use the
>printf-Statement.
>What options I have to set and what Statements are necassary, to see an
>output at the screen with printf?
>
>Thank You
>J.Schwarzbach
>
>
>_______________________________________________
>Dev-cpp-users mailing list
>Dev...@li...
>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
|
|
From: Jack Y. <jy...@tw...> - 2001-12-06 14:39:50
|
Hello, I'm trying to add a second resource file to my project. I selected Project Options and added the two files so I have someting like pathname:\rsrc1.rc; rsrc2.rc When I try to compile, the displayed error says rsrc2.rc does not exist. It does exist. In fact, if I switch the order, the message then says rsrc1.rc does not exist. Can someone explain to me where I am going wrong? Jack -- E-Mail: jy...@tw... Alt: jy...@vo... Home: http://my.voyager.net/~jyork |
|
From: <J.S...@t-...> - 2001-12-06 14:18:39
|
Till now, I worked only with DOS-Compilers. (only C, not C++) But with this compiler I cannot see output, when I use the printf-Statement= . What options I have to set and what Statements are necassary, to see an out= put at the screen with printf? Thank You=20 J.Schwarzbach |