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 3754718
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T09:35:17+00:00 2026-05-19T09:35:17+00:00

I am creating a program in C++ to break down a character array that

  • 0

I am creating a program in C++ to break down a character array that the user enters into individual characters and then to add them to a 2d array. The bits of the keyword are stored in char’s j-l. when I try to give the value of the chars to a part of the array it doe not work but when I try to give the value of a part of the array to the chars it works. Someone will probably mention the conflict between string functions and arrays and char variables. Exept for this one little problem the setup works for me and if I try to change it it comes up wih some errors. Is there a simple way to fix this problem without changing the arrays and function to a different type? If not please tell me what to do, I am only a beginner.

while (key[a] != '\0' ){

while(b <= 4){
        m++;
cipherarray[b][c] = key[a];

 if (m == 1 ) {

if I swith this to “cipherarray[b][c] = f;” it works but then cipherarray[b][c] = “q”

f = cipherarray[b][c];
}

 if ( m == 2 )
 {
g = cipherarray[b][c];
}

 if ( m == 3 )
 {
h = cipherarray[b][c];
}

 if ( m == 4  )
 {
i = cipherarray[b][c];
}


 if ( m == 5 ) 
{
j = cipherarray[b][c];
}

 if ( m == 6 )
 {
k = cipherarray[b][c];
}

 if ( m == 7 )
 {
l = cipherarray[b][c];
}


a++;
b++;
if (key[a] == 0)
break; 
}

if (key[a] != 0){
c++;
b = 0;
}
}

By the way this is the error i get:

incompatible types in assignment of std::string to char[2]

  • 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-19T09:35:17+00:00Added an answer on May 19, 2026 at 9:35 am

    I just changed al of the chars to strings and the function decalation. I have been slaving over this for so long I could not see how obvious it was to fix.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating a program that needs to store the user's data in encrypted
WRITTEN IN JAVA Im creating a program that connects to a proxy and then
I am creating a program that will be installed using the .net installer project.
Let's say I'm creating a program in C that needs to use a tempfile.
I have been tasked with creating a program that will generate an amortization schedule.
I'm creating a program that installs a keyboard hook to capture all keys and
I have been tasked with creating a program what will create take files in
I've been tasked (by my wife) with creating a program to allow her to
I am creating object-detection program on Mac. I want to use iSight in manual
I am creating a test program to test the functionality of program which calcultes

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.