473,327 Members | 1,930 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,327 software developers and data experts.

3D Array of (Array of Strings) -- my malloc attempts fail miserably

15 Byte
I'm trying to make a sort-of-dictionary (don't think "hashmap" when you see that d-word, my dictionary is just simple lists of words in a 3D array)

Expand|Select|Wrap|Line Numbers
  1. #define MAX_WORDLENGTH 20
  2.  
  3. struct dict{
  4.     int wordcount;
  5.     char **words;
  6. };
  7.  
  8. struct dict dicts[MAX_WORDLENGTH + 1]; // +1 to get an index for MAX_WORDLENGTH
e.g. dicts[7] is the struct dict for 7-letter words (7 excludes \0).
dicts[0] .. [2] will always be unused, and depending on the problem-instance, some (or many) other dicts[N] may also be unused.

After some preparatory work (examine problem-instance to learn necessary word-lengths, read words of necessary lengths from disk through a series of regex-like filters to get word-count for each word-length), I'm ready to malloc.

Imagine 123 words of 7-letters.
What I want to be able to do is iterate through those 7-letter words: i.e. use something like
Expand|Select|Wrap|Line Numbers
  1. dicts[7].words[5]
to set/get the 6th 7-letter word with strncpy().

Here is just one of my 99 failed attempts:

Expand|Select|Wrap|Line Numbers
  1. printf(" .words: %p before malloc\n", dicts[wordlen].words);
  2. // .words: 0x0 before malloc
  3.  
  4. int wordlen = 7;
  5. char (*p)[wordlen+1]; // +1 for \0
  6. dicts[wordlen].words = malloc(dicts[wordlen].wordcount * sizeof *p);
  7.  
  8. printf(" .words: %p after malloc\n", dicts[wordlen].words);
  9. // .words: 0x14c606690 after malloc
  10.  
  11. printf(" .words[5]: %p after malloc\n", dicts[wordlen].words[5]);
  12. // .words[5]: 0x0 after malloc
...malloc did something, but certainly not what I wanted it to do :(

Tweaking around with variations **, *, & juggles segfaults/errors/warnings, but nothing I've tried has actually worked!

I've got my pointers in a twist: please help.
Chris
May 1 '22 #1
15 11310
dev7060
633 Expert 512MB
Expand|Select|Wrap|Line Numbers
  1. printf(" .words: %p before malloc\n", dicts[wordlen].words);
  2. // .words: 0x0 before malloc
  3.  
  4. int wordlen = 7;
  5. char (*p)[wordlen+1]; // +1 for \0
  6. dicts[wordlen].words = malloc(dicts[wordlen].wordcount * sizeof *p);
  7.  
  8. printf(" .words: %p after malloc\n", dicts[wordlen].words);
  9. // .words: 0x14c606690 after malloc
  10.  
  11. printf(" .words[5]: %p after malloc\n", dicts[wordlen].words[5]);
  12. // .words[5]: 0x0 after malloc
How does it point to the addresses of the words?

Imagine 123 words of 7-letters.
What I want to be able to do is iterate through those 7-letter words: i.e. use something like
Expand|Select|Wrap|Line Numbers
  1. dicts[7].words[5]
to set/get the 6th 7-letter word with strncpy().
Expand|Select|Wrap|Line Numbers
  1. dicts[5].wordcount = 3;
  2.  
  3. dicts[5].words    = malloc(dicts[5].wordcount * sizeof(char *));
  4. dicts[5].words[0] = malloc(6 * sizeof(char));
  5. dicts[5].words[1] = malloc(6 * sizeof(char));
  6. dicts[5].words[2] = malloc(6 * sizeof(char));
  7.  
  8. strncpy(dicts[5].words[0], "sieve", 5);
  9. strncpy(dicts[5].words[1], "mango", 5);
  10. strncpy(dicts[5].words[2], "hello", 5);
Check for NULL in case malloc doesn't work.
May 5 '22 #2
Chris3020
15 Byte
Thanks for the suggestion ...sorry, not tested yet - but it makes sense.
Will experiment tomorrow morning.

Is there no way to get this done with a single malloc per dicts[n] ?
...many thousands of malloc() seems less "efficient".

All this happens in a "setup-phase", so it doesn't need to be fast ...run-times for the application that uses dicts[] can be seconds to hours depending on the problem instance, so a few seconds here or there at setup is totally irrelevant.

The client application will pull some number (a tweak not yet defined, but somewhere around 10...15) of x-length words from dicts[x]: again thinking efficiency, a single malloc() might aid locality for cache purposes.

Chris

Below is a compilable single malloc() approach that DOES NOT WORK.

Expand|Select|Wrap|Line Numbers
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4.  
  5. #define MAX_WORDLEN 10    // maximum word-length in test ( sans \0 )    
  6.  
  7. struct dict{
  8.     int wordcnt;    // count of words in dict
  9.     int nexti;    // reserved
  10.     char *words;    // wannabe array of fixed-length strings
  11. };
  12.  
  13. struct dict dicts[MAX_WORDLEN + 1];    // +1 to get index MAX_WORDLEN
  14.  
  15. int main(void) {
  16.     // just a mock-up with: fake word-reads from file; magic-numbers; no free;
  17.     // no check on malloc success; and the whole mess in-line in main().
  18.  
  19.     char *read50 = "ALPHA"; // some faked linebuffers from file read
  20.     char *read51 = "BRAVO";
  21.     char *read52 = "CATCH";
  22.     char *read53 = "DRINK";
  23.     char *read70 = "EXTINCT";
  24.     char *read71 = "FLAVOUR";
  25.  
  26.     int wordlen;    // length ( sans \0 ) of word being handled
  27.     int wordcnt;    // number of word of length wordlen
  28.  
  29.     // do stuff...that provides:
  30.     wordlen = 5;
  31.     wordcnt = 4; // ...the fake Linebuffers read5n
  32.  
  33.     char *aword[wordlen + 1];
  34.     dicts[wordlen].words = malloc(wordcnt * sizeof(*aword));
  35.     // populate using the faked linebuffers:    
  36.     strncpy(&dicts[wordlen].words[0], read50, wordlen+1);
  37.     strncpy(&dicts[wordlen].words[1], read51, wordlen+1);
  38.     strncpy(&dicts[wordlen].words[2], read52, wordlen+1);
  39.     strncpy(&dicts[wordlen].words[3], read53, wordlen+1);
  40.  
  41.     // do more stuff...that provides:
  42.     wordlen = 7;
  43.     wordcnt = 2; // ...the fake linebuffers read7n
  44.  
  45.     char *bword[wordlen + 1];
  46.     dicts[wordlen].words = malloc(wordcnt * sizeof(*bword));
  47.     // populate using the faked linebuffers
  48.     strncpy(&dicts[wordlen].words[0], read70, wordlen);
  49.     strncpy(&dicts[wordlen].words[1], read71, wordlen);
  50.  
  51.     puts(" what happens?"); // using magic-numbers
  52.     for (int i = 0; i <  4; ++i) {
  53.         printf(" &dicts[5].words[%d]: %s\n", i, &dicts[5].words[i]);
  54.     }
  55.     for (int i = 0; i < 2; ++i) {
  56.         printf(" &dicts[7].words[%d]: %s\n", i, &dicts[7].words[i]);
  57.     }
  58.  
  59.     return 0;
  60. }
  61. /* OUTPUT:
  62.  what happens?
  63.  &dicts[5].words[0]: ABCDRINK
  64.  &dicts[5].words[1]: BCDRINK
  65.  &dicts[5].words[2]: CDRINK
  66.  &dicts[5].words[3]: DRINK
  67.  &dicts[7].words[0]: EFLAVOUR
  68.  &dicts[7].words[1]: FLAVOUR
  69. */
  70.  
May 5 '22 #3
dev7060
633 Expert 512MB
Allocating large chunks to limit malloc calls

1)
Expand|Select|Wrap|Line Numbers
  1. struct dict{
  2.     int wordcount;
  3.     char **words;
  4. };
Expand|Select|Wrap|Line Numbers
  1. char * mylist;
  2.  
  3. dicts[5].wordcount = 3;
  4. dicts[5].words = malloc(dicts[5].wordcount * sizeof(char * ));
  5.  
  6. mylist = malloc(sizeof(char) * 6 * dicts[5].wordcount);
  7.  
  8. dicts[5].words[0] = mylist + 0;
  9. dicts[5].words[1] = mylist + 6;
  10. dicts[5].words[2] = mylist + 12;
  11.  
  12. strncpy(dicts[5].words[0], "sieve", 5);
  13. strncpy(dicts[5].words[1], "mango", 5);
  14. strncpy(dicts[5].words[2], "hello", 5);

2)
Expand|Select|Wrap|Line Numbers
  1. struct dict{
  2.     int wordcount;
  3.     char *words;
  4. };
Expand|Select|Wrap|Line Numbers
  1. dicts[5].wordcount = 3;
  2. dicts[5].words = malloc(sizeof(char) * 6 * dicts[5].wordcount);
  3.  
  4. strncpy(dicts[5].words + 0, "sieve", 5);
  5. strncpy(dicts[5].words + 6, "mango", 5);
  6. strncpy(dicts[5].words + 12, "hello", 5);
May 6 '22 #4
Chris3020
15 Byte
Mmmmmm interesting!
**words just has to be more correct in the struct: I have a dozens of variations using ** (and hundreds of errors/warnings to go with).
I will study (and experiment with) your stuff over the weekend.
Thank you!
Chris

My latest effort is below. It still uses *words in the struct, it compiles, it even works (...but it is not pretty):
Expand|Select|Wrap|Line Numbers
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4.  
  5. #define MAX_WORDLEN 10    // maximum word-length in test ( sans \0 )    
  6.  
  7. struct dict{
  8.     int wordcnt;    // count of words in dict
  9.     int nexti;        // reserved
  10.     char *words;    // wannabe array of fixed-length strings
  11. };
  12.  
  13. struct dict dicts[MAX_WORDLEN + 1];    // +1 to get index MAX_WORDLEN
  14.  
  15. int main(void) {
  16.     // just a mock-up with: fake word-reads from file; magic-numbers; no free;
  17.     // no check on malloc success; and the whole mess in-line in main().
  18.  
  19.     char *read50 = "ALPHA"; // some faked linebuffers from file read
  20.     char *read51 = "BRAVO";
  21.     char *read52 = "CATCH";
  22.     char *read53 = "DRINK";
  23.     char *read70 = "EXTINCT";
  24.     char *read71 = "FLAVOUR";
  25.  
  26.     int wordlen;    // length ( sans \0 ) of word being handled
  27.     int wordcnt;    // number of word of length wordlen
  28.  
  29.     // do stuff...that provides:
  30.     wordlen = 5;
  31.     wordcnt = 4; // ...the fake linebuffers read5n
  32.  
  33.     // drop the terminating \0 from the stored no-longer-strings
  34.     // +    makes the dictionary smaller
  35.     // -    makes printing the "string" more complicated (don't need print!)
  36.     dicts[wordlen].words = malloc(wordcnt * wordlen);
  37.     // populate using the faked linebuffers:    
  38.     strncpy(&dicts[wordlen].words[0*wordlen], read50, wordlen);
  39.     strncpy(&dicts[wordlen].words[1*wordlen], read51, wordlen);
  40.     strncpy(&dicts[wordlen].words[2*wordlen], read52, wordlen);
  41.     strncpy(&dicts[wordlen].words[3*wordlen], read53, wordlen);
  42.  
  43.     // do more stuff...that provides:
  44.     wordlen = 7;
  45.     wordcnt = 2; // ...the fake linebuffers read7n
  46.  
  47.     char *bword[wordlen + 1];
  48.     dicts[wordlen].words = malloc(wordcnt * sizeof(*bword));
  49.     // populate using the faked linebuffers
  50.     strncpy(&dicts[wordlen].words[0*wordlen], read70, wordlen);
  51.     strncpy(&dicts[wordlen].words[1*wordlen], read71, wordlen);
  52.  
  53.     puts(" what happens?");
  54.     // any eventual print function would have a fixed buffer name, but because
  55.     // we have the whole mess in-line in main(), test needs two buff names.
  56.     // outside of development, no use for printing words from dicts!
  57.     puts("\n wordlen: 5");
  58.     wordlen = 5;
  59.     wordcnt = 4;
  60.     char buff5[wordlen+1]; // in a print function (if wanted), name is fixed
  61.     for (int i = 0; i < wordcnt; ++i) {
  62.         strncpy(buff5, &dicts[wordlen].words[i*wordlen], wordlen);
  63.         printf(" &dicts[wordlen].words[%d*wordlen]: %s\n", i, buff5);
  64.     }
  65.  
  66.     puts("\n wordlen: 7");
  67.     wordlen = 7;
  68.     wordcnt = 2;
  69.     char buff7[wordlen+1]; // print function (if wanted) has fixed name
  70.     for (int i = 0; i < wordcnt; ++i) {
  71.         strncpy(buff7, &dicts[wordlen].words[i*wordlen], wordlen);
  72.         printf(" &dicts[wordlen].words[%d*wordlen]: %s\n", i, buff7);
  73.     }
  74.  
  75.     return 0;
  76. }
  77. /* OUTPUT:
  78.  what happens?
  79.  
  80.  wordlen: 5
  81.  &dicts[wordlen].words[0*wordlen]: ALPHA
  82.  &dicts[wordlen].words[1*wordlen]: BRAVO
  83.  &dicts[wordlen].words[2*wordlen]: CATCH
  84.  &dicts[wordlen].words[3*wordlen]: DRINK
  85.  
  86.  wordlen: 7
  87.  &dicts[wordlen].words[0*wordlen]: EXTINCT
  88.  &dicts[wordlen].words[1*wordlen]: FLAVOUR
  89. */
  90.  
May 6 '22 #5
Chris3020
15 Byte
I went with 2)
It was very close to my "latest effort" above.

I didn't like the extra 8 bytes per word in dicts[] of 1), though it was "pretty".

Thanks for all your suggestions, Chris

Current test rig looks like this:

[]
Expand|Select|Wrap|Line Numbers
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4.  
  5. #define MAX_WORDLEN 10 // maximum word-length in test ( sans \0 )   
  6.  
  7. struct dict{
  8.   unsigned wordcnt;  // count of words in dict
  9.   unsigned next;     // put: next empty slot / get: next unread
  10.   char *words;       // fixed-length array of chars ( sans \0 !!not strings)
  11. };
  12.  
  13. static struct dict dicts[MAX_WORDLEN + 1];  // +1 to have index MAX_WORDLEN
  14.  
  15. static void dict_allocate(unsigned wordlen   // char-count ( sans \0 ) 
  16.                           unsigned wordcnt.  // count of wordlen-letter words
  17.                          ) {
  18.   dicts[wordlen].words = malloc(wordlen * wordcnt);
  19.   if ( dicts[wordlen].words == NULL ) {
  20.     puts(" ERROR, dictionary memory allocation failed");
  21.     printf(" for %d words of %d-letters ...will exit\n", wordcnt, wordlen);
  22.     exit(EXIT_FAILURE);
  23.   }
  24.   dicts[wordlen].wordcnt = wordcnt; // remains 0 if malloc fail
  25. }
  26.  
  27. static void dict_putword( // add word at .next index in .words
  28.                          unsigned wordlen, // char-count ( sans \0 )
  29.                          char *word 
  30.                         ) {
  31.   if ( dicts[wordlen].next >= dicts[wordlen].wordcnt ) {
  32.     puts(" ERROR, attempted putword beyond upper-bound");
  33.     printf(" of %d-letter dictionary ...will exit\n", wordlen);
  34.     exit(EXIT_FAILURE);
  35.   }
  36.   strncpy(&dicts[wordlen].words[dicts[wordlen].next*wordlen], word, wordlen);
  37.   dicts[wordlen].next++;
  38. }
  39.  
  40. static void dict_restart_all(void) {
  41.   for (int i = 0; i < MAX_WORDLEN + 1; ++i) {
  42.     dicts[i].next = 0;
  43.   }
  44. }
  45.  
  46. static void dict_free(void) {
  47.   for (int i = 0; i < MAX_WORDLEN; ++i) {
  48.     if ( dicts[i].wordcnt ) {
  49.       free(dicts[i].words);
  50.       dicts[i].words = NULL;
  51.       printf("DEV\tfreed %d\n", i);
  52.     }
  53.   }
  54. }
  55.  
  56. //////////////////////////// external ////////////////////////////
  57.  
  58. int dict_getword( // return .next word in caller's buffer
  59.                  unsigned wordlen, // char-count ( sans \0 )
  60.                  char *buff.       // buffer for wordlen chars (sans \0)
  61.                 ) {
  62.    if ( dicts[wordlen].next >= dicts[wordlen].wordcnt ) {
  63.       return 0;   // no word got: we hit upper-bound
  64.                // caller decides to dict_restart_dict()   ...or not
  65.         }
  66.         strncpy(buff, &dicts[wordlen].words[dicts[wordlen].next*wordlen], wordlen);
  67.         dicts[wordlen].next++;
  68.         return 1;
  69. } // returns 1: word in buff  or  0: empty buff (hit upper bound of dict)
  70.  
  71. int dict_getnwords( // does NOT wrap around to 0 at upper-bound
  72.                    unsigned wordlen, // char-count ( sans \0 )
  73.                    unsigned start,   // index of first word to get
  74.                    unsigned count,   // desired number of words 
  75.                    char *buff        // caller's buffer count*wordlen char   
  76.                   ) {
  77.   unsigned got = 0;   // count of words copied to buffer = next buffer index               
  78.   puts(" dict_getnwords() NOT YET IMPLEMENTED");
  79.   return -1;
  80.  
  81.   return got;
  82. } // returns 0...count = the number of words copied to buff, -ve is error
  83.  
  84. void dict_restart_dict(unsigned wordlen) {
  85.   dicts[wordlen].next = 0;
  86. }
  87.  
  88. void dict_printdict(unsigned wordlen) { // DEV purposes only
  89.   char buff[wordlen +1];
  90.   for (int i = 0; i < dicts[wordlen].wordcnt; i++) {
  91.     strncpy(buff, &dicts[wordlen].words[i*wordlen], wordlen);
  92.     printf("\t%d: %s\n", i, buff);
  93.   }
  94. }
  95.  
  96. int main(void) {
  97.  
  98.   char *read50 = "ALPHA"; // some faked "linebuffers from file read"
  99.   char *read51 = "BRAVO";
  100.   char *read52 = "CATCH";
  101.   char *read53 = "DRINK";
  102.   char *read70 = "EXTINCT";
  103.   char *read71 = "FLAVOUR";
  104.  
  105.   unsigned wordlen;  // length ( sans \0 ) of word being handled
  106.   unsigned wordcnt;  // number of words of length wordlen
  107.  
  108.   // do stuff...that provides:
  109.   wordlen = 5;
  110.   wordcnt = 4; // ...the fake linebuffers read5n
  111.  
  112.   dict_allocate(wordlen, wordcnt);
  113.   // populate using the fake linebuffers:
  114.   dict_putword(wordlen, read50);
  115.   dict_putword(wordlen, read51);
  116.   dict_putword(wordlen, read52);
  117.   dict_putword(wordlen, read53);
  118.  
  119.   // do more stuff...that provides:
  120.   wordlen = 7;
  121.   wordcnt = 2; // ...the fake linebuffers read7n
  122.  
  123.   dict_allocate(wordlen, wordcnt);
  124.   // populate using the fake linebuffers
  125.   dict_putword(wordlen, read70);
  126.   dict_putword(wordlen, read71);
  127.  
  128.   // done writing dicts. Time to re-init all .next for the reading-phase
  129.   dict_restart_all();
  130.  
  131.   puts(" dictionary contents:");
  132.  
  133.   wordlen = 5;
  134.   printf(" wordlen = %d\n", wordlen);
  135.   dict_printdict(wordlen);
  136.  
  137.   wordlen = 7;
  138.   printf(" wordlen = %d\n", wordlen);
  139.   dict_printdict(wordlen);
  140.  
  141.   puts("\n 5-letter words from dict_getword() ...and exceed upper-bound:");
  142.   wordlen = 5;
  143.   char gotbuf[wordlen + 1];
  144.   for (int i = 0; i < 10; ++i) { // tries to go out-of-bounds
  145.     if ( !dict_getword(wordlen, gotbuf) ) {
  146.       puts("DEV\texceeded upper-bound of dict!");
  147.       break;
  148.     }
  149.     printf(" %d: %s\n", i, gotbuf);
  150.   }
  151.  
  152.   puts("\n try free():");
  153.   dict_free();
  154.  
  155.   puts("\n done!\n");
  156.   return 0;
  157. }
  158.  
  159. /* OUTPUT:
  160.  dictionary contents:
  161.  wordlen = 5
  162.   0: ALPHA
  163.   1: BRAVO
  164.   2: CATCH
  165.   3: DRINK
  166.  wordlen = 7
  167.   0: EXTINCT
  168.   1: FLAVOUR
  169.  
  170.  5-letter words from dict_getword() ...and exceed upper-bound:
  171.  0: ALPHA
  172.  1: BRAVO
  173.  2: CATCH
  174.  3: DRINK
  175. DEV  exceeded upper-bound of dict!
  176.  
  177.  try free():
  178. DEV  freed 5
  179. DEV  freed 7
  180.  
  181.  done!
  182.  
  183. */
May 7 '22 #6
Chris3020
15 Byte
mmm; straight copy/paste code from BBEdit is __NOT__ a good idea: the <tab>s went crazy. Sorry!
...will try to edit!
May 7 '22 #7
Chris3020
15 Byte
Apparently I can't edit stuff inside code ... /code tags.
Ho hum!

Chris
May 7 '22 #8
zmbd
5,501 Expert Mod 4TB
Chris,
You can edit within the [code] [/code] tags; however, it takes a bit of extra effort! 👾
>As you discovered [Tabs] do not work

What I have found easier for myself is that pull the text over into something like Notepad++ and you can then do a replace on all of the tabs ( /t) with several spaces and then cut and paste the revised block back into the post.

Table layouts are the more difficult within the [code] [/code] it usually takes me a few extra tries to get things to line up nicely.

Please try to edit the code again... if you continue to have issues let one of us know what you're trying to do and we'll see if we can help you out.
May 8 '22 #9
Chris3020
15 Byte
Thanks zmbd.
Had a go at fixing the <tab> issue.
Chris

...just noticed: code seems to have dropped some underscores! between copy and paste.
...ah no! some underscores don't show, but copy from posted code to text-editor and they are back again.
[#r!§
May 8 '22 #10
zmbd
5,501 Expert Mod 4TB
@chris3020 Had a go at fixing the <tab> issue. [...] ...just noticed: Code seems to have dropped some underscores! Between copy and paste.
How absolutely frustrating.... sorry that's happening.
I had a go at the editor myself to see if there was anything I could do... purged another 30ish [Tab] characters from the text; however, comparing what shows online to what I had in the text editor didn't show any obvious differences - please take a moment to see if the underscores are still missing - if so, maybe give me the line numbers from the margin pleadings.
May 8 '22 #11
Chris3020
15 Byte
!!ASHAMED!! that you found 30 residual <tab> ...I went through line-by-line manually replacing <tab> with <space><space>.
I was using Mac TextEdit for this exercise (an app that I don't normally use, so I didn't try auto find/replace).
My only hope for salvation is that those errant <tab> were between meaningful char and \n.

!!BAFFLED!! by the underscores.
Looking again now, they are all there, but earlier they were not (evidence in .png but no way to post .png here without revealing to *.world the server concerned).

Even when the underscores were NOT visible chez vous in my browser, copy/paste to a text editor happily revealed the underscores - they were there!

Chris
May 8 '22 #12
Chris3020
15 Byte
Bah!
It just happened again:

open page: missing some (not all) underscores!
refresh page: hey ho, underscores are back!
eh?

Is it me?
MacBook Air (M1 2020)
MacOS BigSur 11.6.5
Safari 15.4 (16613.1.17.1.13, 16613)
// this is not the appropriate forum in which to discuss the most absurd version nomenclature on the planet!

Or you?

Chris
May 8 '22 #13
Chris3020
15 Byte
silly error:

Expand|Select|Wrap|Line Numbers
  1. static void dict_free(void) {
  2.   for (int i = 0; i < MAX_WORDLEN; ++i)...  // should be:  i < MAX_WORDLEN+1;
May 8 '22 #14
zmbd
5,501 Expert Mod 4TB
@Chris3020{Safari 15.4 (16613.1.17.1.13, 16613)}
My guess... it's a Safari thing - doesn't seem to be happening in Edge, Firefox, nor Chrome
Of course, the Edge version I'm using has Chrome as the core engine... (shrug)
You can try to use Firefox; however, from what I understand, it uses the Safari core engine...
At this point - I think we leave it as is :)

{silly error:}
It's the little things that will kill you
Working a CSS and my body wouldn't update - "varBodyBg" is not the same as "VarBodyBg" took me ages to figure out that one mistake
and that's why we're here - that second (third, ... thousandth) set of eyes.
May 8 '22 #15
Chris3020
15 Byte
@zmbd:
I think we leave it as is :)

+1 vote. Chris
May 9 '22 #16

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Rafi Kfir | last post by:
Hi, This may look as a smiple task to most of you, but to me (a beginner with C), it drives me crazy. All I want is that one function passes a two dimensional array of strings to another...
7
by: Ben | last post by:
Hey everybody, I'm working on a program in c++, and I've come up against a problem that I can't figure out. I don't imagine that it's too difficult to solve, but it has been giving me trouble....
9
by: sci | last post by:
I believe both ways to create an array of strings are correct. Is there any difference between these two? 1. char *MyString = {"First string", "Second string", ..."Tenth string"}; 2. char...
4
by: John | last post by:
I'm trying (struggling) to use realloc to grow a list of strings. The number of strings is not known (this is a subset of an assignment to write a recursive ls program... my BS was in EE, so I'm...
4
by: Simon Mansfield | last post by:
Hey everyone, I have created a struct called employee, as follows: struct employee { int pid; char name; char job; int hourlyRate; struct employee *next; }
13
by: jesper | last post by:
Hello, I have to load strings from a datbase and put them into an array. I get them by packets of 100 strings of 50 characters. Then I should do something like that : StringArray But x can be...
6
by: karthika.28 | last post by:
Hi, I am writing a function that needs to return an array of strings and I am having some trouble getting it right. Can you help me answer the following questions? 1. How does the function...
25
by: Rainmaker | last post by:
Hi, Can anyone tell me an efficient algorithm to sort an array of strings? Keep in mind that this array is HUGE and so the algorithm should me efficient enough to deal with it. Thanks
1
by: Rajesh | last post by:
Hi All, I'm having problems marshalling an array of strings between C# and C++ C# static extern void Func(out IntPtr num, ref IntPtr str); IntPtr strPtr = IntPtr.Zero;
10
by: vignesh4u | last post by:
I am trying to implement the Split function in C ie. if i have a string: char* S="This is a test"; and if i try to split based on space ' ' it should return an array of strings like: ...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.