how do you declare strings in C++?
148785
ignacionr2 has the most correct response to this question.  The standard C++ library has a 'string' type in the standard ('std') namespace that allows you to declare and initialize an abstract string type.\n\nNote, the header files for the standard C++ library no longer have the ".h" extension on them.  So for I/O streams, you'd use: "#include <iostream>" and for strings, you'd use: "#include <string>".\n\nTo declare instances of a string, you could use:\n\nstd::string myString = "string one";\n\nor\n\nstd::string myString("string two");\n\nYou can add a "using std::string;" to your local scope as a shortcut to avoid typing "std::" to qualify the standard string's namespace.
779217
There are built-in functions in a programming language to perform that task.For instance in C++ we have: cint("string value") for converting the string value into integer.And in Visual Basic we have the val() function to do the same thing.
1178612
Well.... That's too Hard to find... i'm poor at C++...... So can't help.. have good day! Search in Google
1069483
Try using String.Format()\n\nFor example:\n\nString.Format("Hello {0}, you are {1}",\n      value1,\n      value2)
593709
instead of \ntitle = "Hello World";  \ntry\ntitle.Text = "Hello World";\n\nthe lable object can not be assigned a string value, but the Text property of the lable object can :)
964471
Hi there you can go to www.cplusplus.com\nOr if you want help ina specific topic just goolgle iT. fOR example\narrays in C++ go to i'm feeling lucky
92611
Use the following syntaxis:\n\nLike *[#]*
260093
Here it is:-\n\n/* Convert.cpp */\n/* Display the reverse of the input */\n/* By Senthil */\n\n#include <iostream.h>\n#include <conio.h>\n#include <string.h>\n\nvoid main()\n{\nchar inp[10];\nint cnt = 0, ex = 0;\nclrscr();\n\ncout<<"Enter some characters (max limit 10) : ";\ncin>>inp;\n\ncnt = strlen(inp);\ncnt--;\nfor(ex = 0;ex != cnt;ex++,cnt--)\n{\ninp[ex] = inp[cnt];\n}\ncout<<"The reverse of the string is : "<<inp;\ngetch();\n}
448114
In C++ you should do this:
499645
20+ years ago, I had a homework assignment to do this. However, I had to do it in PL/C. It is possible, but being so long ago, I don't remember exactly how I did it. I remember it started with something like the following:\n\nvoid main()\n{\ncout << "void main()";\ncout << "{";\n// Oops there's a problem here!!!\ncout << "}";\n}\n\nI have a memory of using an array of strings to store the values, rather than list them out individually. I also remember that each token was in two places: as a command in the program and within the string, so when I discovered a mistake, I needed to correct it in two places.\n\nI was taking an automata theory at the time. Our instructor had us do this exercise to demonstrate the principle of proving things about turing machines by having a program execute itself. This technique is used to prove the halting problem.
4727
With modern C++ compilers you do have the bool (note minuscules) type. You can declare it like this:\n\nbool myBooleanVariable;\n\nYou may assign literals to it (literals for the bool data type are 'true' and 'false'):\n\nmyBooleanVariable = true;\nmyBooleanVariable = false;\n\nYou may assign them the result of boolean operations:\n\nmyBooleanVariable = (a > 5) && (b < 2);\n\nYou may declare functions to return bool results:\n\nbool IsInvoiceCurrent();\n\nYou may also test for their values directly:\n\nif (myBooleanVariable) ...\nif (!myBooleanVariable) ...
635623
I don't know C++. But You can do it by sending  the text in to prn folder. Same thig you can do it in DOS type a.txt >prn
901296
I think the most problem lies on your use of datatypes and variables. There is an error assigning teman[0] to some value, as teman is not declared as array of objects. It should be like this:\nteman.word[0] = "something". Anyway, you have set the word access priority to private, so you need to provide the functions to get and set the values into it, such as: public void setWord(int, string) and public string getWord(int) which will insert the word according to the number of element specified by int in setWord, and return the current value of word in getWord.\n\n\n\nNext, teman.putAtPosition("ada",3) and teman.toString() also cant be accepted because you have referred a method to which the object doesnt hhave it. This is again about the teman object which is misreferred by you as a string object.
916933
Your language is most likely c/c++, so the answer is then yes. You will then have 50 strings ranging from list[0] to list[49] in which to store your data. Of course, you will have to include the correct header file, i.e. #include <filename>, and if in c++, make sure to include "using namespace std;" (if appropriate in your program).\n\nWhy not just try it and see what the compiler tells you? One of the best ways to learn programming is to just try things and see what happens. If the result is not what you expected, try something else!
267921
You can turn these into proper C++ statements:\n\nread a, b\n\nlet max = a\n\nif max < b\n  let max = b\nendif\n\nprint max\n\nThis program assumes that a <> b.
814965
what c++ program are you referring to ...anyway the syntax is\n\n#include<iostream.h>\n#include<conio.h>\n...include all the header files here ..\n\nint count()\n  {\n     function body\n     return value #integer value to be returned \n\n  }\n\nother functions\n\nvoid main() \n\n   {\n\n# this is the main function \n\nint a,b,c;\nfloat al,bl;\nstring str;\n\n#declare the variables\n\n#get the inputs from the user\ncout<<"enter the value of a ";\ncin>>a;\n...\n...\n\ncall the functions\n\nb=count()\n..\n#do what ever processing has to be done\n } # program closing curly braces\n\n\nhope this helps\n\nthis is a excellent c++ tutorial \n\nhttp://www.geocities.com/sstutor\n\ncprogramming.com is also pretty good
1070095
use programing syntax