Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » is there a substring method?
is there a substring method? [message #2914] Sat, 29 April 2006 23:06 Go to next message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
Hi,

according to Wiki doc I tried this to get a substring
   String a = line.Mid(10¸ 10);

but the compiler cry:
C:\Vega\Vega3\ConnectDB.cpp:48: error: stray '\184' in program
C:\Vega\Vega3\ConnectDB.cpp:48: error: expected `)' before numeric constant

What is wrong with the previous code?
Luigi
Re: is there a substring method? [message #2917 is a reply to message #2914] Sat, 29 April 2006 23:32 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
forlano wrote on Sat, 29 April 2006 22:06

Hi,

according to Wiki doc I tried this to get a substring
   String a = line.Mid(10¸ 10);

but the compiler cry:
C:\Vega\Vega3\ConnectDB.cpp:48: error: stray '\184' in program
C:\Vega\Vega3\ConnectDB.cpp:48: error: expected `)' before numeric constant

What is wrong with the previous code?
Luigi


first of all, to many ";" in one line Smile - should be ","...
Re: is there a substring method? [message #2920 is a reply to message #2917] Sun, 30 April 2006 07:09 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
fudadmin wrote on Sat, 29 April 2006 23:32

forlano wrote on Sat, 29 April 2006 22:06

Hi,

according to Wiki doc I tried this to get a substring
   String a = line.Mid(10¸ 10);

but the compiler cry:
C:\Vega\Vega3\ConnectDB.cpp:48: error: stray '\184' in program
C:\Vega\Vega3\ConnectDB.cpp:48: error: expected `)' before numeric constant

What is wrong with the previous code?
Luigi


first of all, to many ";" in one line Smile - should be ","...

Shocked
If you believe or not I've copied and pasted it from my code. In it there was not the stupid "¸" but ','. So I wanted to post
   String a = line.Mid(10 , 10);

After your answer I came to the code again and I saw that the ',' was not a real ',' but some sign between ',' and '.' that I do not how appeared. Very strange indeed but it is not a fairy and I do not smoke anything! So "¸" is the HTML code of this ghost sign.
Anyway, after the substitution with ',' Mid( x,y) works and this is enough. Very Happy .
Luigi
Re: is there a substring method? [message #2922 is a reply to message #2920] Sun, 30 April 2006 07:56 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
forlano wrote on Sun, 30 April 2006 01:09

fudadmin wrote on Sat, 29 April 2006 23:32

forlano wrote on Sat, 29 April 2006 22:06

Hi,

according to Wiki doc I tried this to get a substring
   String a = line.Mid(10¸ 10);

but the compiler cry:
C:\Vega\Vega3\ConnectDB.cpp:48: error: stray '\184' in program
C:\Vega\Vega3\ConnectDB.cpp:48: error: expected `)' before numeric constant

What is wrong with the previous code?
Luigi


first of all, to many ";" in one line Smile - should be ","...

Shocked
If you believe or not I've copied and pasted it from my code. In it there was not the stupid "¸" but ','. So I wanted to post
   String a = line.Mid(10 , 10);

After your answer I came to the code again and I saw that the ',' was not a real ',' but some sign between ',' and '.' that I do not how appeared. Very strange indeed but it is not a fairy and I do not smoke anything! So "¸" is the HTML code of this ghost sign.
Anyway, after the substitution with ',' Mid( x,y) works and this is enough. Very Happy .
Luigi



Ahh, sorry to get you confused, cedilla is Assist++ thing (read docs). It is in order to make parameters selected... (if you press ',' before cedilla, next parameter gets selected so that you can enter it with the real value).


Mirek

Previous Topic: Array container does only serialize base classes
Next Topic: Can we consider Regex "under development"?
Goto Forum:
  


Current Time: Wed May 01 22:35:42 CEST 2024

Total time taken to generate the page: 0.02181 seconds