锘??xml version="1.0" encoding="utf-8" standalone="yes"?>婷婷中文字幕一区三区,国产精品主播,国产私拍精品http://www.aygfsteel.com/xmoses/J-XMoseszh-cnWed, 18 Jun 2025 16:02:51 GMTWed, 18 Jun 2025 16:02:51 GMT60typedef keyword in C++http://www.aygfsteel.com/xmoses/archive/2007/03/22/105614.htmlJava-XMosesJava-XMosesThu, 22 Mar 2007 09:48:00 GMThttp://www.aygfsteel.com/xmoses/archive/2007/03/22/105614.htmlhttp://www.aygfsteel.com/xmoses/comments/105614.htmlhttp://www.aygfsteel.com/xmoses/archive/2007/03/22/105614.html#Feedback0http://www.aygfsteel.com/xmoses/comments/commentRss/105614.htmlhttp://www.aygfsteel.com/xmoses/services/trackbacks/105614.htmlread this article -> http://www.functionx.com/cpp/keywords/typedef.htm
It said that "The typedef keyword can be followed by an attribute before the data type. In its simplest form, the attribute can be that of an access level such as public, private, or protected." and provide a examples:


#include <iostream>
#include <string>
using namespace std;

typedef struct Student;
typedef class Country;

typedef public short SmallNumber;
typedef private unsigned int Positive;
typedef protected double* PDouble;
typedef public string FiveStrings[5];
typedef private double (*Addition)(double value1, double value2);

struct Student
{
	string FirstName;
	string LastName;
};

typedef struct _Empl
{
	string FullName;
	double HourlySalary;
}Employee;

class Country
{
	string Name;
	string Capital;
	string Code;
};

double Add(double x, double y)
{
	double result = x + y;
	return result;
}

typedef enum EmplStatus { esFullTime, esPartTime, esContractor };
typedef Student *PStudent;
typedef Country *PCountry;

int main()
{
	Student pupil;
	Country pais;
	EmplStatus emplst;
	PStudent ptrStd = new Student;
	PCountry pPais = new Country;

	return 0;
}


I found that I can't compile it on my Linux using g++.


[root@sd1 xxx]# g++ typedef.cpp -o typedef
typedef.cpp:8: error: expected unqualified-id before 'public'
typedef.cpp:9: error: expected unqualified-id before 'private'
typedef.cpp:10: error: expected unqualified-id before 'protected'
typedef.cpp:11: error: expected unqualified-id before 'public'
typedef.cpp:12: error: expected unqualified-id before 'private'


Why, can anybody tell me?
:)

Java-XMoses 2007-03-22 17:48 鍙戣〃璇勮
]]>
C++ operator precedencehttp://www.aygfsteel.com/xmoses/archive/2007/03/22/105599.htmlJava-XMosesJava-XMosesThu, 22 Mar 2007 09:11:00 GMThttp://www.aygfsteel.com/xmoses/archive/2007/03/22/105599.htmlhttp://www.aygfsteel.com/xmoses/comments/105599.htmlhttp://www.aygfsteel.com/xmoses/archive/2007/03/22/105599.html#Feedback0http://www.aygfsteel.com/xmoses/comments/commentRss/105599.htmlhttp://www.aygfsteel.com/xmoses/services/trackbacks/105599.html
http://www.cppreference.com/operator_precedence.html
PrecedenceOperatorDescriptionExampleAssociativity
1()
[]
->
.
::
++
--
Grouping operator
Array access
Member access from a pointer
Member access from an object
Scoping operator
Post-increment
Post-decrement
(a + b) / 4;
array[4] = 2;
ptr->age = 34;
obj.age = 34;
Class::age = 2;
for( i = 0; i < 10; i++ ) ...
for( i = 10; i > 0; i-- ) ...
left to right
2!
~
++
--
-
+
*
&
(type)
sizeof
Logical negation
Bitwise complement
Pre-increment
Pre-decrement
Unary minus
Unary plus
Dereference
Address of
Cast to a given type
Return size in bytes
if( !done ) ...
flags = ~flags;
for( i = 0; i < 10; ++i ) ...
for( i = 10; i > 0; --i ) ...
int i = -1;
int i = +1;
data = *ptr;
address = &obj;
int i = (int) floatNum;
int size = sizeof(floatNum);
right to left
3->*
.*
Member pointer selector
Member pointer selector
ptr->*var = 24;
obj.*var = 24;
left to right
4*
/
%
Multiplication
Division
Modulus
int i = 2 * 4;
float f = 10 / 3;
int rem = 4 % 3;
left to right
5+
-
Addition
Subtraction
int i = 2 + 3;
int i = 5 - 1;
left to right
6<<
>>
Bitwise shift left
Bitwise shift right
int flags = 33 << 1;
int flags = 33 >> 1;
left to right
7<
<=
>
>=
Comparison less-than
Comparison less-than-or-equal-to
Comparison greater-than
Comparison geater-than-or-equal-to
if( i < 42 ) ...
if( i <= 42 ) ...
if( i > 42 ) ...
if( i >= 42 ) ...
left to right
8==
!=
Comparison equal-to
Comparison not-equal-to
if( i == 42 ) ...
if( i != 42 ) ...
left to right
9&Bitwise ANDflags = flags & 42;left to right
10^Bitwise exclusive ORflags = flags ^ 42;left to right
11|Bitwise inclusive (normal) ORflags = flags | 42;left to right
12&&Logical ANDif( conditionA && conditionB ) ...left to right
13||Logical ORif( conditionA || conditionB ) ...left to right
14? :Ternary conditional (if-then-else)int i = (a > b) ? a : b;right to left
15=
+=
-=
*=
/=
%=
&=
^=
|=
<<=
>>=
Assignment operator
Increment and assign
Decrement and assign
Multiply and assign
Divide and assign
Modulo and assign
Bitwise AND and assign
Bitwise exclusive OR and assign
Bitwise inclusive (normal) OR and assign
Bitwise shift left and assign
Bitwise shift right and assign
int a = b;
a += 3;
b -= 4;
a *= 5;
a /= 2;
a %= 3;
flags &= new_flags;
flags ^= new_flags;
flags |= new_flags;
flags <<= 2;
flags >>= 2;
right to left
16,Sequential evaluation operatorfor( i = 0, j = 0; i < 10; i++, j++ ) ...left to right


Finally, I find basic knowledge is important.

Java-XMoses 2007-03-22 17:11 鍙戣〃璇勮
]]>
I know Why I failed so many times in trying to connect mysql installed on other serverhttp://www.aygfsteel.com/xmoses/archive/2006/03/24/37276.htmlJava-XMosesJava-XMosesFri, 24 Mar 2006 13:42:00 GMThttp://www.aygfsteel.com/xmoses/archive/2006/03/24/37276.htmlhttp://www.aygfsteel.com/xmoses/comments/37276.htmlhttp://www.aygfsteel.com/xmoses/archive/2006/03/24/37276.html#Feedback0http://www.aygfsteel.com/xmoses/comments/commentRss/37276.htmlhttp://www.aygfsteel.com/xmoses/services/trackbacks/37276.htmlToday I finally found the reason:
You need exec reload to make the change take effect using "./mysqladmim -uroot -p<your password> reload"

So I can connect from other PC to the mysql Server.

Just trick, but very useful.

Java-XMoses 2006-03-24 21:42 鍙戣〃璇勮
]]>
kbps or Kbpshttp://www.aygfsteel.com/xmoses/archive/2006/03/03/33514.htmlJava-XMosesJava-XMosesFri, 03 Mar 2006 09:40:00 GMThttp://www.aygfsteel.com/xmoses/archive/2006/03/03/33514.htmlhttp://www.aygfsteel.com/xmoses/comments/33514.htmlhttp://www.aygfsteel.com/xmoses/archive/2006/03/03/33514.html#Feedback0http://www.aygfsteel.com/xmoses/comments/commentRss/33514.htmlhttp://www.aygfsteel.com/xmoses/services/trackbacks/33514.htmlShort for kilobits per second, a measure of data transfer speed. Modems, for example, are measured in Kbps. Note that one Kbps is 1,000 bits per second, whereas a KB (kilobyte) is 1,024 bytes. Data transfer rates are measured using the decimal meaning of K whereas data storage is measured using the powers-of-2 meaning of K. Technically, kbps should be spelled with a lowercase k to indicate that it is decimal but almost everyone spells it with a capital K.



Java-XMoses 2006-03-03 17:40 鍙戣〃璇勮
]]>
The META-INF directory in the JAR filehttp://www.aygfsteel.com/xmoses/archive/2006/03/01/33067.htmlJava-XMosesJava-XMosesWed, 01 Mar 2006 13:39:00 GMThttp://www.aygfsteel.com/xmoses/archive/2006/03/01/33067.htmlhttp://www.aygfsteel.com/xmoses/comments/33067.htmlhttp://www.aygfsteel.com/xmoses/archive/2006/03/01/33067.html#Feedback0http://www.aygfsteel.com/xmoses/comments/commentRss/33067.htmlhttp://www.aygfsteel.com/xmoses/services/trackbacks/33067.htmlThe META-INF directory, if it exists, is used to store package and extension configuration data, including security, versioning, extension and services.
The following files/directories in the META-INF directory are recognized and interpreted by the Java 2 Platform to configure applications, extensions, class loaders
and services:

  • MANIFEST.MF

.................

Tag libraries should be packed with their .tlds packed in their META-INF directory. JSP engines look through the JAR files in the /lib directory for TLDs and add the tags as necessary. Then when you are installing tag libraries, you only need to deliver one file - the JAR - no changes to the web.xml, no extra tlds hanging around.



Java-XMoses 2006-03-01 21:39 鍙戣〃璇勮
]]>
Use the DBCP in Application that running multiple threadshttp://www.aygfsteel.com/xmoses/archive/2006/02/21/31820.htmlJava-XMosesJava-XMosesTue, 21 Feb 2006 08:34:00 GMThttp://www.aygfsteel.com/xmoses/archive/2006/02/21/31820.htmlhttp://www.aygfsteel.com/xmoses/comments/31820.htmlhttp://www.aygfsteel.com/xmoses/archive/2006/02/21/31820.html#Feedback0http://www.aygfsteel.com/xmoses/comments/commentRss/31820.htmlhttp://www.aygfsteel.com/xmoses/services/trackbacks/31820.htmlI will write a snippet of code to test the DBCP. How should I do ?? Hmmm~~~
Let me try and give out a test result.

I am a tester

Java-XMoses 2006-02-21 16:34 鍙戣〃璇勮
]]>
Route selection in routing tablehttp://www.aygfsteel.com/xmoses/archive/2006/02/21/31743.htmlJava-XMosesJava-XMosesTue, 21 Feb 2006 01:58:00 GMThttp://www.aygfsteel.com/xmoses/archive/2006/02/21/31743.htmlhttp://www.aygfsteel.com/xmoses/comments/31743.htmlhttp://www.aygfsteel.com/xmoses/archive/2006/02/21/31743.html#Feedback0http://www.aygfsteel.com/xmoses/comments/commentRss/31743.htmlhttp://www.aygfsteel.com/xmoses/services/trackbacks/31743.htmlThe route that has the lowest preference value is selected. If the preference values are the same, the metrics values are then compared.The route that has the lowest metric value is then selected.

Java-XMoses 2006-02-21 09:58 鍙戣〃璇勮
]]>
Why the select method of JTextArea don't take effect.http://www.aygfsteel.com/xmoses/archive/2006/02/20/31629.htmlJava-XMosesJava-XMosesMon, 20 Feb 2006 05:32:00 GMThttp://www.aygfsteel.com/xmoses/archive/2006/02/20/31629.htmlhttp://www.aygfsteel.com/xmoses/comments/31629.htmlhttp://www.aygfsteel.com/xmoses/archive/2006/02/20/31629.html#Feedback1http://www.aygfsteel.com/xmoses/comments/commentRss/31629.htmlhttp://www.aygfsteel.com/xmoses/services/trackbacks/31629.htmlIn my swing UI, there is JTextArea component named "textarea_webpage", I want to mark some sentence in the textarea as marked using program just as user selecting them using mouse.
------------------------------------------------------------Code Below-------------------------------------------------
textarea_webpage.setSelectionColor(Color.black);
textarea_webpage.setSelectedTextColor(Color.white);
textarea_webpage.setSelectedTextColor(Color.white);
textarea_webpage.select(urlItem.getStart(),urlItem.getEnd()); // the urlItem is self-defined object to store positon information of certain sentences
----------------------------------------------------------------------------------------------------------------------------

Every time the code is executed, there is nothing take place in my textarea.
After goolge for the answer in the net.
I found that I forgot the code 
         
textarea_webpage.getCaret().setSelectionVisible(true);

There are so many tricks in Swing designing, I'm just a beginner.
Pay more attention.



Java-XMoses 2006-02-20 13:32 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 金乡县| 阿荣旗| 土默特左旗| 呼和浩特市| 洱源县| 丹阳市| 岚皋县| 龙州县| 广平县| 宾阳县| 武山县| 宁乡县| 屯昌县| 富平县| 夹江县| 伊宁市| 喀喇沁旗| 德化县| 长泰县| 枣庄市| 锡林浩特市| 克拉玛依市| 河北区| 延寿县| 湘西| 林周县| 乐陵市| 茶陵县| 邳州市| 连南| 万载县| 中西区| 当阳市| 特克斯县| 盐源县| 莱西市| 上蔡县| 哈密市| 西丰县| 高唐县| 昭觉县|