Sponsored Content
Top Forums Programming Multidimension character array Post 302117512 by janemary.a on Tuesday 15th of May 2007 05:34:45 AM
Old 05-15-2007
Multidimension character array

Hi !

I'm having problem with assigning values to a multidimensional character array.
i wanted to have an array with 48 fields ,each filed being of varying size and hence have declared the array as

char struct_arr[][48];

I am trying to assign values to the fileds as

struct_arr[j] = token

Where token i a character pointer declared as

char *token;

When i try to compile ,i get errors.
Please let me know how can i get it assigned.

Regards,
Jane
 

10 More Discussions You Might Find Interesting

1. Programming

converting contents of a character array to int

Hi, I have character array and i need to convert the content to int. program snipet: char array = {"1","2","3","4","5","6","7","8","9"}. I need to to extract each of these array fields and store them into an integer variable. Casting the contents to (int), gives the ascii value of... (5 Replies)
Discussion started by: jyotipg
5 Replies

2. Shell Programming and Scripting

A final question! Compare character with each array element

qwrtyuiop666yhh (1 Reply)
Discussion started by: rorey_breaker
1 Replies

3. Shell Programming and Scripting

read in a file character by character - replace any unknown ASCII characters with spa

Can someone help me to write a script / command to read in a file, character by character, replace any unknown ASCII characters with space. then write out the file to a new filename/ Thanks! (1 Reply)
Discussion started by: raghav525
1 Replies

4. Shell Programming and Scripting

How to remove a defined character on an array variable in a do while statement in ksh

I have a korn shell code here on a while do statement which replace the string stored on an array removing double quotes characters on it but it doesn't work. example record: appointmentDate = "tree" which value should result to tree #!/bin/ksh # Remove " on string records let recordCount=3... (5 Replies)
Discussion started by: ryukishin_17
5 Replies

5. Shell Programming and Scripting

how can I check the first character of each variable stored in array

variables are stored in this format D0000, D12345, S1234, D12345 | KestrelPrdV2_0.build.177 - svn 141115 tag as V2.0.0.14 D0000, D12345, S1234, D12345 My question is how can I check the first character of each variable stored in array.It should be start with D or S. Please help... (7 Replies)
Discussion started by: anuragpgtgerman
7 Replies

6. Programming

Unable to assign zero to unsigned character array

Hi, I am unable to assign value zero to my variable which is defined as unsigned char. typedef struct ABCD { unsigned char abc; unsigned char def; unsigned char ghi; } ABCD; typedef ABCD *PABCD; In my Por*C code, i assign the values using memcpy like below ... (3 Replies)
Discussion started by: gthangav
3 Replies

7. Shell Programming and Scripting

How to find length of multidimension array ???

Does anyone know how to find length of multi dimension array of following type A Afor simple array I is to do for (i in A)n++ to find length of array but if it is multi dimension how to find the length ? (2 Replies)
Discussion started by: nex_asp
2 Replies

8. Programming

Character pointer to Character array

how to copy content of character pointer to character array in c programming.. char *num; char name=num; (1 Reply)
Discussion started by: zinat
1 Replies

9. Shell Programming and Scripting

Use decimal value of array in bc ends with illegal character

hi all I have to read a long cvs file every 4 columns with decimal "3,45" numbers. The 9th row in this cvs is the first line I need, so it I tail -n+9. I use sed -e 's/,/./g' to get decimal values with . delimiter. So far no problem. Goal is to get two maximum negative forces in ranges... (5 Replies)
Discussion started by: Grille
5 Replies

10. Shell Programming and Scripting

Replace character in awk array

somedata | awk -F"#soils#" '{split($1,a,"NITNUM="); print a}' how can i edit the content of array 2 above? what i want to do is get rid of single quotes and double quotes. and then turn the "NewLine" into new lines. the data in array 2 (a) is: ... (2 Replies)
Discussion started by: SkySmart
2 Replies
MONGOCOLLECTION(3)							 1							MONGOCOLLECTION(3)

The MongoCollection class

INTRODUCTION
Represents a MongoDB collection. Collection names can use any character in the ASCII set. Some valid collection names are "", "...", "my collection", and "*&#@". User-defined collection names cannot contain the $ symbol. There are certain system collections which use a $ in their names (e.g., local.oplog.$main), but it is a reserved character. If you attempt to create and use a collection with a $ in the name, MongoDB will assert. CLASS SYNOPSIS
MongoCollection MongoCollection Constants o const int$MongoCollection::ASCENDING1 o const int$MongoCollection::DESCENDING-1 Fields o public MongoDB$db NULL o public integer$w o public integer$wtimeout Methods o public array MongoCollection::aggregate (array $pipeline, [array $options]) o public MongoCommandCursor MongoCollection::aggregateCursor (array $command, [array $options]) o public mixed MongoCollection::batchInsert (array $a, [array $options = array()]) o public MongoCollection::__construct (MongoDB $db, string $name) o public int MongoCollection::count ([array $query = array()], [array $options = array()]) o public array MongoCollection::createDBRef (mixed $document_or_id) o public bool MongoCollection::createIndex (array $keys, [array $options = array()]) o public array MongoCollection::deleteIndex (string|array $keys) o public array MongoCollection::deleteIndexes (void ) o public array MongoCollection::distinct (string $key, [array $query]) o public array MongoCollection::drop (void ) o public bool MongoCollection::ensureIndex (string|array $key|keys, [array $options = array()]) o public MongoCursor MongoCollection::find ([array $query = array()], [array $fields = array()]) o public array MongoCollection::findAndModify (array $query, [array $update], [array $fields], [array $options]) o public array MongoCollection::findOne ([array $query = array()], [array $fields = array()], [array $options = array()]) o public MongoCollection MongoCollection::__get (string $name) o public array MongoCollection::getDBRef (array $ref) o public array MongoCollection::getIndexInfo (void ) o public string MongoCollection::getName (void ) o public array MongoCollection::getReadPreference (void ) o public bool MongoCollection::getSlaveOkay (void ) o public array MongoCollection::getWriteConcern (void ) o public array MongoCollection::group (mixed $keys, array $initial, MongoCode $reduce, [array $options = array()]) o public bool|array MongoCollection::insert (array|object $document, [array $options = array()]) o public array[MongoCommandCursor] MongoCollection::parallelCollectionScan (int $num_cursors) o public bool|array MongoCollection::remove ([array $criteria = array()], [array $options = array()]) o public mixed MongoCollection::save (array|object $document, [array $options = array()]) o public bool MongoCollection::setReadPreference (string $read_preference, [array $tags]) o public bool MongoCollection::setSlaveOkay ([bool $ok = true]) o public bool MongoCollection::setWriteConcern (mixed $w, [int $wtimeout]) o static protected string MongoCollection::toIndexString (mixed $keys) o public string MongoCollection::__toString (void ) o public bool|array MongoCollection::update (array $criteria, array $new_object, [array $options = array()]) o public array MongoCollection::validate FALSE ([bool $scan_data]) PREDEFINED CONSTANTS
o MongoCollection::ASCENDING - 1 - Ascending direction for sorts and index creation. o MongoCollection::DESCENDING - -1 - Descending direction for sorts and index creation. FIELDS
o $db - The "parent" database for this collection. o $w - The number of servers to replicate a change to before returning success. Value is inherited from the parent database. The Mon- goDB class has a more detailed description of how w works. o $wtimeout - The number of milliseconds to wait for $this->w replications to take place. Value is inherited from the parent database. The MongoDB class has a more detailed description of how wtimeout works. SEE ALSO
MongoDB core docs on collections. PHP Documentation Group MONGOCOLLECTION(3)
All times are GMT -4. The time now is 03:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy