why should you use a std::string insted of char array in c++?
Type: Posts; User: orion-
why should you use a std::string insted of char array in c++?
correct this code for me please..
int main()
{
const int max = 5;
int *array = new int [max];
array[max] = {23,43,65,45,67};
return 0;
}
the copy i found on ebay is visual studio 2005 standard edition. whats academic?
right now im using dev-c++ compiler from bloodshed but i am thinking about switching to visual studio 2005. i found a copy of VS 05 on ebay for $60 and i am considering purchasing it. is it worth it...
everyone seems to be in favor of Java.
congratulations on popping the cherry!
whats wrong with java??
my friend said C, C++ and ASM were used to make windows xp. is he correct? i always it thought it was C# and Java....
i downloaded a math library from www.swox.com/gmp and i am not quite sure how to install it so i can use it in my applications. could someone tell me please? the compiler i am using is bloodshed...
look what i found on youtube! an old presentation about OOP C++ programming.
http://www.youtube.com/watch?v=0pHYoc57qkA
i want to get good at c++ but i am terrible with math. does this mean i will not become good at c++?
the value range between int and long are both the same (-2147483648 to 2147483647) and they are both 4 bytes big! whats the difference and when do i know which variable type to use between the two...
thx dragon, your my hero.
but i would like to use 'char' insted of 'string' ...sorry i should've been alittle more specific in my first post.
how would i declare an array of namers? i would like to hold 10 names in one variable. how do i do that??
why not?
im new to c/c++ programming and i havn't learned anything about pointers yet. im still trying to wrap my head around structures.
why can't i pass an already declared string through to a structure?
struct personInfo
{
char theName[21];
int age;
};
thats a nice site! that girl sure knows her C/C++
why are you using turbo c/c++ compiler?? it is alittle bit out of date. i recommend trying dev-cpp from http://www.bloodshed.net/devcpp.html
nice code though (i guess)
it compiles fine under dev-cpp & visual studio
#include <iostream>
void removeChar(char *TheStr, char ch)
{
int len = strlen(TheStr), c = 0;
char Temp1[len], Temp2[len];
strcpy(Temp1,TheStr);
for (int x = 0; x< len;...
i didn't use the STL. i made my very own function that returns the amount of times a certain character occurs within a string. it was actually quite easy (not to brag).
well one of my goals is to greaty familiarize myself with the C/C++ standard template library. but im just not sure how i should go about that...
i just started c++ about 2 weeks ago and ive made the following programs...
hello world
add,subtract,divide,multiply calculator
my very own reverse a string function
count how many times a...