Forum: C++ 25 Days Ago |
| Replies: 7 Views: 364 ya do it step by step.
your code:
ifstream students;
ifstream open("students.txt");
if (students.fail())
{ |
Forum: C++ 26 Days Ago |
| Replies: 0 Views: 396 hi,i am making trees and i want to draw the structure of the tree in windows forms applications.since the class tree has the access to the trees root pointer.so only a member function of the class... |
Forum: C++ 26 Days Ago |
| Replies: 7 Views: 364 you are doing it all wrong..your concepts of ifstream and ofstream arent clear.i think you should first study them,then you will be able to do this assignment!.
well i can help you.
when you make... |
Forum: C++ Oct 2nd, 2009 |
| Replies: 3 Views: 1,756 i havent used that array.
how can i use the elements of the array?
if i have an array char x[]={"whaterver"};
then i know that x[0] has 'w' in it.
how do i know the same thing in the array... |
Forum: C++ Oct 1st, 2009 |
| Replies: 3 Views: 149 can you explain your question a bit?
you can get the value of a pointer by "*".
if
int x=6;
int *y=&x;
cout << *y << endl; //get the value of pointer |
Forum: C++ Oct 1st, 2009 |
| Replies: 3 Views: 1,756 Hi,I want to convert String^ to Int array or a char array.I am reading numbers from a file in GUI but the StreamReader Reads the Text in a String.I need to convert them to use the numbers.
I have... |
Forum: C++ May 21st, 2009 |
| Replies: 2 Views: 665 hi,i am trying to make a global integer array of size 32 in Windows forms.I am Using Visual Studio C++ 2008.
here is my code:
array<Int32^> ^garray = gcnew array<Int32^>(32);
if i declare... |
Forum: C++ May 21st, 2009 |
| Replies: 15 Views: 697 No!...i am using Windows XP!....i have also tried this code on Visual Studio C++ 2008.and why do you think suggesting a c++/CLI solution aint a good idea?.... |
Forum: C++ May 21st, 2009 |
| Replies: 6 Views: 336 thats good,just keep on trying!
you will get the results! |
Forum: C++ May 21st, 2009 |
| Replies: 15 Views: 697 just these:
#using <mscorlib.dll>
using namespace System;
using namespace std; |
Forum: C++ May 21st, 2009 |
| Replies: 8 Views: 377 hm....i think you are right!... |
Forum: C++ May 21st, 2009 |
| Replies: 6 Views: 336 i am going to tell the first one only,you can try the rest by yourself.
think of first figure as four triangles!
1.thats counts and prints in ascending order
2.thats counts and prints in... |
Forum: C++ May 21st, 2009 |
| Replies: 8 Views: 377 yes,i agree thats impractical but i think its better to teach 'em the basics first. |
Forum: C++ May 21st, 2009 |
| Replies: 15 Views: 697 use the following code for random numbers between limits:
Random* r = new Random();
int x=r->Next(10,21);
this will create random numbers between 10 and 20! |
Forum: C++ May 21st, 2009 |
| Replies: 8 Views: 377 first of all you need to learn what array are.you have created an array of
int ages[4];
it means that there are 4 elements in this array,which are
ages[0];
ages[1];
ages[2]; |
Forum: C++ May 21st, 2009 |
| Replies: 4 Views: 738 |
Forum: C++ May 21st, 2009 |
| Replies: 4 Views: 738 thanks a lot,it works now.can you please explain the array a bit,i dont understand it.
Thanks again! |
Forum: C++ May 21st, 2009 |
| Replies: 4 Views: 738 Hi,I want to create a picturebox at runtime.i mean when i click a button then,the picturebox is created.
i have tried this code, but it doesnt work.
... |
Forum: C++ Apr 26th, 2009 |
| Replies: 1 Views: 619 i found it myself!
after a day of searching!
i am putting the code here for anybody else who might encounter this problem!
private: System::Void Form1_Load(System::Object * sender,... |
Forum: C++ Apr 26th, 2009 |
| Replies: 9 Views: 356 i said operator,not operation.
you can also solve this by reading the whole line and then making tokens with strtok(array,delimiters). or use if statements to solve the variable like...
... |
Forum: C++ Apr 25th, 2009 |
| Replies: 9 Views: 356 use infile.getline(name of your array,size,delmiter);
it will read the whole line,and you are reading the '+' sign in character form yo cannot perform any operations on it!.
another way to solve... |
Forum: C++ Apr 25th, 2009 |
| Replies: 1 Views: 619 hi,i m making a windows forms application and i want to make a treeview which displays input of textbox Under the Parent Node .
i have tried searching over the internet,but nothing seems to be... |
Forum: C++ Mar 11th, 2009 |
| Replies: 16 Views: 584 no line 35 aint a problem,its just type casting the return type to be a pointer!
i have used it in my other functions,works well! |
Forum: C++ Mar 11th, 2009 |
| Replies: 16 Views: 584 my poor function couldn't handle an array of 61 characters!...
i checked it,it does check conditions but somewhere it gives the array out of bound error and so gives a runtime error! |
Forum: C++ Mar 11th, 2009 |
| Replies: 16 Views: 584 i havent used it,but i will give it a try! |
Forum: C++ Mar 11th, 2009 |
| Replies: 16 Views: 584 lol...i m using Visual Studio express edition 2008 |
Forum: C++ Mar 11th, 2009 |
| Replies: 16 Views: 584 it gives the same error!...
btw i checked the string.h function and it also gave a runtime error for the same values......thats weird! |
Forum: C++ Mar 11th, 2009 |
| Replies: 10 Views: 1,133 lol.....here is my code,i want to add a choice to each menu so that the user can return to the main function whenever he wants to.
[code=c++]
char *record(char **p,char **q,int n,int ho);
char... |
Forum: C++ Mar 11th, 2009 |
| Replies: 10 Views: 1,133 i have functions that call "other functions",and i want to make a menu that return the user from the "other functions" to the main directly,but i also have a while loop in main,and some code above... |
Forum: C++ Mar 10th, 2009 |
| Replies: 10 Views: 1,133 ya i am a newbie!
i want to return to the lines above ,where i call the function,i cant design my program.
i want to return to a menu which is in the main and if the user wants to run the function... |
Forum: C++ Mar 10th, 2009 |
| Replies: 10 Views: 1,133 i have so many functions in my program,what i want to do is, i want to return back to the main() but in somewhere middle of it!.
should i use goto statements?
i tried 'em,it gave some error!
... |
Forum: C++ Mar 10th, 2009 |
| Replies: 4 Views: 954 you can use them to dynamically initialize memory (mean that at runtime u decide the number of elements of the array)
for both 2d And 1d |
Forum: C++ Mar 10th, 2009 |
| Replies: 16 Views: 584 your code is totally wrong,it will never work! |
Forum: C++ Mar 10th, 2009 |
| Replies: 5 Views: 18,822 here is how you initialize the function and pass the values
char *function(char **array)
{
//your code here
return 0;
}
int main() |
Forum: C++ Mar 10th, 2009 |
| Replies: 3 Views: 274 it does not help!
what i want to know is that how should i check the conditions,how would i check conditions horizontally,diagonally and vertically?
what you have done is that u took the if... |
Forum: C++ Mar 10th, 2009 |
| Replies: 15 Views: 545 o yes,it is "stdio.h".
what i have learned is that we donot use ".h" in VC2008 like : i use "iostream" not with ".h" |
Forum: C++ Mar 10th, 2009 |
| Replies: 3 Views: 274 i m making a program which initializes a 2d Dynamic array by first asking for the number of rows and columns,and then filling the array with random characters.
Then i have to check for a three... |
Forum: C++ Mar 10th, 2009 |
| Replies: 16 Views: 584 Error(msg BOX):
Assignment 3_Question 2.exe has encountered a problem and needs to close. We are sorry for the inconvenience. |
Forum: C++ Mar 10th, 2009 |
| Replies: 5 Views: 1,562 'stdafx' is just the default name for the 'precompiled header directive'. The headers that included in stdafx.h are compiled once, and the information is saved to disk. When a file includes stdafx.h,... |
Forum: C++ Mar 10th, 2009 |
| Replies: 15 Views: 545 stdio.h is used in vc6.0 and many other old programs.
in VC2008 you use #include "stdio" |