|
just i am asking what how to let user enter his name ,
i want to make program that ask you enter your name, your family name,?
specify by writing the code please .
Thank you
|
|
|
|
|
my frnd you should first include string.h and declarethe variable for example#include"iostream.h" #include"string.h" main(){ string name; cout<<"enter your name"; cin>>name; cout<<"your name is "<<name; }
modified 5-May-13 12:02pm.
|
|
|
|
|
You should use <pre> tags round code (using the code link above) and line it up properly like:
include"iostream.h"
#include"string.h"
main()
{
string name;
cout << "enter your name";
cin >> name;
cout << "your name is "<<name;
}
The var link is used to highlight single words or phrases such as int variable; in a sentence.
Use the best guess
|
|
|
|
|
It depends on your program type. If it's a console app then see the answer provide by Yashwanth. If it's a Windows app then the normal way would be to use a dialog box. There are many samples to be found which explain how to do it.
Use the best guess
|
|
|
|
|
hi frnds i am newbie to c++.i like to develop my own language in c++ but i dont know where to start with. So plz help me my frnds . I am just 15 years old. I already know c c++ and java
|
|
|
|
|
|
thank u for ur help. The alef ++ language greatly helped me. Now i can continue my work with an idea. I AM unable to express my thanks in words.
|
|
|
|
|
Yashwanth. C.b wrote: I AM unable to express my thanks in words. You could start by not using bold font for your messages.
Use the best guess
|
|
|
|
|
|
The windows procecure like LRESULT CALLBACK MainWndProc(), windows get the return value.
I wonder what are the meanings of the return value, for example,
return 0, return 2, etc.
I saw many example codes using return 0.
modified 6-May-13 11:57am.
|
|
|
|
|
|
hello every body :
i just want to under
stand what the pointer in linked list point to ,it is a object pointer but it seems to me that it doesn't point to any thing
class LList
{
private:
struct ListNode int var2;
ListNode *next;};
ListNode *head; public:
LList( void ) { head = NULL; } ~LList( void ); void appendNode( float , int );
void insertNode( float , int );
void deleteNode( float , int );void displayList( void );
};
|
|
|
|
|
Within your
struct ListNode I would expect a
ListNode* pNext
and another
ListNode* pPrev which must be set by one of the methods called on an instance of your
LList to point to the next and previous structures in the list.
They don't point to anything to start with, it's only when you add one to a list that they are used - they are the links in the linked list.
|
|
|
|
|
This is a class definition, so it merely describes the parts of the class. You need to write the implementation of each function which will manage the pointers.
Use the best guess
|
|
|
|
|
Like any other uninitialized variable, an uninitialized pointer contains garbage (or, in other words, points to garbage).
In the shown code, head is initialized with NULL to mark the list as empty, it is responsibility of appendNode (or insertNode ) implementation to allocate a fresh ListNode and make head pointing to it.
Veni, vidi, vici.
|
|
|
|
|
i saw ur name in top experts
Great.!
i've a question and i posted it in forum but i didnt get correct answer
so i want too ask u that question as u r an expert
please give me answer
sorry for writing here
i'm waiting for ur reply
Thanks in advance
HOW TO WRITE SQL QUERY IN XML?
please explain about it
i seen an article in this forum but it not help me lot of errors in it
Thanks in advance
|
|
|
|
|
i'm waiting for ur response ---CPallini
|
|
|
|
|
Actually I'm not an expert, neither of SQL nor of XML . However you may store data both in databases and in XML files, each method having its pros and cons. Typically you query for data in databases using SQL , while use XPath for finding them in XML files. If you are interested in using XML files as data storage then you may find many many tutorial available on the web, just use Google.
Veni, vidi, vici.
|
|
|
|
|
Hi,
I have one question...
Is there any way a C/C++ program can crash before main()?
Regards,
Mbatra
modified 3-May-13 6:46am.
|
|
|
|
|
The question is unclear: are you asking about compilation order?
int x = ;
int main()
{
return 0;
}
this will not compile, error is before main
there are no facts, only interpretations
|
|
|
|
|
Hi,
My question was:
Is there any way a C/C++ program can crash before main()?
Like when u run your program, it crashes even before it starts to execute main..
Regards,
Mbatra
|
|
|
|
|
Yes, it is possible, but without more details it is impossible to guess why.
Use the best guess
|
|
|
|
|
The initialization of your static variables are performed before main() and their deinitialization is performed after main() returns or after the exit() call. If you put buggy code in there then you can easily crash before/after main().
|
|
|
|
|
Yes ! A c/c++ program will crash when it can't find a necessary library.
|
|
|
|
|
Here is a cooked-up example:
#include <iostream>
using namespace std;
class Crash
{
public:
Crash()
{
int *a = new int[5];
for (int i = 0; i < 7; ++i)
{
a[i] = 25;
}
delete[] a;
}
};
Crash crash;
void main()
{
cout << "If ever I come here ..." << endl;
}
This program will crash even before entering main().
modified 3-May-13 11:15am.
|
|
|
|