Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6085473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:38:33+00:00 2026-05-23T11:38:33+00:00

I have an array of string declared like so: char parts[PART_COUNT][PART_MAX]; Then i made

  • 0

I have an array of string declared like so:

char parts[PART_COUNT][PART_MAX];

Then i made a function which takes a string and a array of strings and splits it into those parts, which is declared like this:

WORD PartString(const char *str, char **parts, char sep);

I can seem to read at parts[i][j], but if i try to assign like this:

parts[i][j] = str[x];

I get this error:

Unhandled exception at 0x012614d8 in remote.exe: 0xC0000005: Access violation writing location 0xcccccccc.

Can anyone tell me a way to do this in C? thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T11:38:34+00:00Added an answer on May 23, 2026 at 11:38 am
    #define PART_MAX      1024
    #define PART_COUNT    4
    

    Ok, managed to fix it, i had my compiler warnings off and when i turned them back on i got this:

    'char **' differs in levels of indirection from 'char [4][1024]'
    

    Heres the new declaration which lets me modify the strings in the array:

    WORD PartString(const char *str, char (*parts)[PART_MAX], char sep)
    

    THen i just pass as:

    PartString(buffer, parts, '.');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Say I have an array of Strings declared like this: String[] strings = new
I have a procedure declared like so: procedure MyProc(List: Array of string); I want
Possible Duplicate: std::vector<std::string> to char* array I have to call a c function that
An array is defined of assumed elements like I have array like String[] strArray
Lets say I have an array like this: string [] Filelist = ... I
Say I have an array of strings: string[] strArray = {aa, bb, xx, cc,
I have C function that takes string pointer as a parameter. This functions returns
I have an array of type string which I want to re-use inside a
I have a single dimensional array of items declared and initialized as: string[] SubDirectorylist
I have a fixed-size array declared: int vals[25]; And I'd like to send the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.