Click here to Skip to main content
15,881,803 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I need to convert const char* const x from C++ to its equivalent C# .How can I do this. ? Thanks.


What I have tried:

I think string would be appropriate here.
Posted
Updated 31-Dec-22 10:45am
Comments
Richard MacCutchan 30-Apr-18 7:40am    
There is no equivalent, use a readonly string.

You may try to use converter to find out the destination spelling: .NET Code Conversion - Convert Your Code[^]
 
Share this answer
 
Comments
hamid18 30-Apr-18 8:11am    
Thanks for always helping me :)
Maciej Los 30-Apr-18 8:21am    
You're very welcome.
CPallini 4-Jun-19 4:58am    
5.
Maciej Los 4-Jun-19 5:18am    
Thank you, Carlo.
using namespace std;
 
int main() {
    setlocale(LC_ALL, "Russian");
    float  rez = 1, r;
    int i;
    for (i = 1; i <= 10; ++i) {
        cout<<"i"<< i<<"-";
        cin>>r;
        rez += r;
       
    }
    rez = rez / 10;
    cout<< rez;
    return 0;
}
 
Share this answer
 
Comments
Graeme_Grant 31-Dec-22 17:13pm    
This was already answered and accepted back in June 2019. Please stick to current questions where help is needed.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900