0

i wish to use this java code in c++.

String bname[] = { "Unix Environment", "Programming in Perl",  "Comp. Architechture", "Operating System", "Java Programming", "DIstributed OS","Database Management", "J2ME","Operating Systems", "Algorithms in C++"};

how do I initialize char array in c++ ?:-|

3
Contributors
2
Replies
3
Views
10 Years
Discussion Span
Last Post by John A
0
char* bname[] = { "Unix Environment",
                                         "Programming in Perl",
                                         "Comp. Architechture",
                                         "Operating System",
                                         "Java Programming",
                                         "DIstributed OS",
                                         "Database Management",
                                         "J2ME","Operating Systems",
                                         "Algorithms in C++"} ;
0

Depends what you want to do. The best way in C++ to do this would be like this:

#include <iostream>
#include <string> // useful for string manipulation

std::string bname[] = { "Unix Environment", "Programming in Perl",  "Comp. Architechture", "Operating System", "Java Programming", "DIstributed OS","Database Management", "J2ME","Operating Systems", "Algorithms in C++"};
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.