Questions tagged [arrayofstring]
51 questions
0
votes
1 answer
Editing an array of strings in c
I'm writing code for a poker game and in my main function I have:
const char *suits[4] = { "Spades", "Clubs", "Hearts", "Diamonds" };
const char *faces[13] = { "Ace", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten", "Jack",…

Leshawn Rice
- 31
- 1
- 1
- 3
0
votes
1 answer
qsort() function in c used to compare an array of strings
I am trying to recreate the Linux command ls in C. I have the program working (going through a list of directories passed in as command line arguments, and pushing all the contents to an array of strings).
Now I'm trying to implement the quicksort…

ScaVenGerS
- 61
- 1
- 10
0
votes
3 answers
FindSpaces method using recursion java
I am trying to write a method that takes an input of a string, and returns a list of possible strings in which logical spaces have been included by checking to see if parts of the string match dictionary words. For example:
Example:
input:…

cart2003
- 9
- 1
0
votes
0 answers
Isolate of xml in xmlns ArrayOfString with PHP
I have a webpage with the following content:

user3128313
- 23
- 1
- 5
0
votes
1 answer
StringBuilder insert method
I'm attempting to insert a character to the beginning of each substring Instead of inserting at position 0 of the substring, the method is inserting the character(s) to the beginning of the entire string. For example:
Input: esttar apple%hc…
user5924094
0
votes
2 answers
dynamic memory allocation for double pointer takes size as one but can hold a string more than a byte.how is this possible?
Can u explain how the memory of the below gets allocated to hold such big string even though am giving size of malloc to be only one byte
char **str;
int len = 1;
str = malloc(sizeof(char*)*len);//wont this allocate only one byte in heap?
str[0] =…

Meghana
- 49
- 5
0
votes
1 answer
I want to know how to propstype to get database like this?
{
"_id" : ObjectId("577c4b18b1216fd9cb1a2ffc"),
"username" : "John",
"todolist" : [
{
"_id" : ObjectId("577c4b36b1216fd9cb1a2ffd"),
"newtodo" : {
"tittle" : "Playing football"
…

Bee BBFL
- 9
- 2
0
votes
2 answers
reading a file in c++ to an array of strings keeps repeating the last word
When I read in a .txt file with 5 words in it from my program and put into an array with 20 spaces the last word in my file fills up the last 16 places in my array. Any ideas why? The file I am inputting will have a maximum of 20 words.
newArray…

Y3DII
- 53
- 1
- 2
- 9
0
votes
2 answers
Array of strings with no malloc in c
Can someone tell me whats wrong with that code?And i cant use malloc because i havent learn it in class.I mean can i make a 2d array of strings without malloc and if yes how i am i supposed to write an element when i want to change it/print it/scan…
user5744341
0
votes
0 answers
Losing values with iterative realloc in C
I am working in C with Netbeans8.0
I have to read files in an iterative approach to get list of words. That is, in single iteration a file is read into an array of strings and then merge this array into a single array.
void merge_array(char** a,int*…

aswathi p
- 13
- 3
0
votes
1 answer
How to send "ArrayOfString" in soap request?
The method I am using is expecting an array of string - I only want to send one value (first_name) associated with the parameter "attributes" - It works in SOAPUI
SoapObject request2 = new SoapObject(NAMESPACE, METHOD_NAMEdoselect);…

user3785656
- 45
- 5
0
votes
1 answer
How to parse wcf ksoap2 response that returns List> android
I have a wcf ksoap2 service that returns List> as response. Now I have to parse this response
anyType
{
ArrayOfstring=anyType
{
string=Wireless; string=Access Wireless; string=anyType{}; string=anyType{}; string=00001;…

yakhtarali
- 432
- 13
- 30
0
votes
6 answers
how to get the sum of the two random value from an array of strings in java?
im working on a card pair game that generates two random value from an array of strings.. what i want to know is how to get the sum of two random values from the array of strings to determine the winner. here are the codes
import…

Nap Anagao
- 1
- 1
-1
votes
2 answers
delphi convert set type to array of character
Currently in a legacy code I have a set which I want to convert to array of string so i can pass this as a parameter for existing method.
//Existing code to be used and converted
const
North = 'F';
Pay = 'P';
Lynk = 'L';
TCharSet =…

mano
- 308
- 3
- 19
-1
votes
1 answer
assigning an array of strings to another one
I'm trying to parse a C array of strings, assigning a part of the words to one array of strings, and the other part to another array. But when I use the strcpy function, I get segfault. Any idea how to solve this?
#include
#include…

sercan tor
- 23
- 6