473,385 Members | 1,642 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Getting certain item from a character array

I have a character array that I am using to get the user's input. I only
want to get out of the array grouping symbols (,),{or}. Is there a way for
me to do this? I am currently trying to use an IF statement.
Dec 11 '05 #1
2 1238
Nevermind, I just remembered about case/switch structures.

"deanfamily" <de********@verizon.net> wrote in message
news:dc2nf.2776$Jz6.752@trnddc06...
I have a character array that I am using to get the user's input. I only
want to get out of the array grouping symbols (,),{or}. Is there a way for
me to do this? I am currently trying to use an IF statement.

Dec 11 '05 #2

deanfamily wrote:
Nevermind, I just remembered about case/switch structures.


You can do it that way or you can use std::string's find functionality.
Of course you would have to use std::string instead of char*. On the
other hand, some of the functions in <algorithm> should be helpful with
char*.

Dec 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Martin Lucas-Smith | last post by:
Is there some way of using ereg to detect when certain filename extensions are supplied and to return false if so, WITHOUT using the ! operator before ereg () ? I have an API that allows as an...
4
by: iannorton | last post by:
Hi, I've spent most of today trying to solve this problem, but sadly no luck. I have an shopping basket based on an array which stores the name, product id, quantity and price for products, i...
10
by: Vishal Grover | last post by:
Hello Everyone, I am seeing a certain behaviour which I find strange, and am curious to get an explanation to it. I have the following program. #include <iostream> #include <cstdlib> using...
12
by: Dennis Plöger | last post by:
Hi all! I'm currently having some problems parsing a char array in c++. (And yes, I'm a half-newbie ;-)) Perhaps you can help me with this: #include <iostream> using std::cout; void...
6
by: Dave Hague | last post by:
whats the fastest way to get the size of a character array? i thought about just making a quick loop but 1) i dont know if thats the best way to do it and 2) im not sure what my loop condition...
3
by: Lachlan Hunt | last post by:
Hi, I've been looking up lots of documentation and trying to work out a cross-platform method of capturing a keyboard event and working out which key was pressed. From what I can find, there...
7
by: jodleren | last post by:
Hi all! I have a problem - I have a list of checkboxes, with certain data... the point is, that some of them are set, and the important thing for mere is to get those values, which have changed...
9
by: antar2 | last post by:
I am a starter in python and would like to write a program that reads lines starting with a line that contains a certain word. For example the program starts reading the program when a line is...
45
by: angelicdevil | last post by:
i have 2 tables 1 is status_type with field name status and other is users with field username and status now i want that the first listbox lists all status from status type ( this i have achieved...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.