473,406 Members | 2,769 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,406 software developers and data experts.

error: request for member ‘length’ in ‘k’, which is of non-class type ‘int’

string decrypt(string e_msg, int k){
int i;
while (e_msg.length() > k.length())
{
k += k;
}
string decrypt_Text = "";
for (i = 0; i <= e_msg.length(); i++)
{

decrypt_Text += e_msg[i] ^ k;
}
cout << "the messege is:" << decrypt_Text << endl;
return decrypt_Text;
}
Oct 21 '16 #1
1 3477
weaknessforcats
9,208 Expert Mod 8TB
k is an int.

Did you mean to say k is a string?
Oct 21 '16 #2

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

Similar topics

0
by: Andy Eshtry | last post by:
Dear Friends I have a urgent problem to solve. I have created a class and its collection and then bind it to a datagrid but got the following error. Please help. Thanks in advance. Andy Eshtry ...
1
by: dave | last post by:
.. Line 38: Function FormatURL5(ByVal strArgument) As String Line 39: If strArgument.length > 0 Then Line 40: Return ("<INPUT id='mmmm' type='checkbox'...
1
by: Soheil | last post by:
I use webservice to connect to a server on Internet and sometimes(not always), I recieve this error on calling webserice member functions. Error: ********************************** Client found...
4
by: Pritam | last post by:
line 7: error: dereferencing pointer to incomplete type 1. #include<stdio.h> 2. #include<sys/stat.h> 3. #include<stdlib.h> 4. void execname() { 5. struct task_struct *my; 6. my =...
6
by: Lawrence Spector | last post by:
I ran into a problem using g++. Visual Studio 2005 never complained about this, but with g++ I ran into this error. I can't figure out if I've done something wrong or if this is a compiler bug. ...
2
by: Hulikal | last post by:
Hi, I using the following query select dateadd(s, 1185255439727, '01-01-1970 05:30:00') on MSSQL 2005. I get the error Arithmetic overflow error converting expression to data type...
4
by: Andre | last post by:
Hi all, Can someone point out what is wrong with this tiny piece of code? I'm compiling it with "g++ ./Main.cpp", and get the error message "error: request for member 'konnect' in 'theSocket',...
8
by: Sep410 | last post by:
Hi all, Here is the code that I have: For h = 2 To dt.Rows.Count - 1 For j = 0 To 11 Excel.Cells(h, k).value = (dt.Rows(h).Item(j).Value).ToString ...
4
by: vodkasoda | last post by:
I may not be that good at C#, but I'm getting pretty good at asking questions :-D !!! I need to "shuffle" an Array, I've found different ways of doing it but can't get any of them to work, this...
3
syedshaffee
by: syedshaffee | last post by:
Hey People, I'm Getting "arithmetic overflow error converting expression to data type int" While Updating And Deleting Please Look @ the Following Attachment Below And This...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.