49,761 Topics
| |
[ICODE] struct Node{ int n; Node *next; }; struct Some{ Node * ptr; }; int main() { Node *aNode = new Node; Some *aSome; aSome->ptr = aNode; } [/ICODE] Why do I get a Seg Fault here? | |
I am writing 1 line to a file and close the file. Then after a few seconds the file will be open and written to again but then when using the code the string is overwritten. What I want to do is to continue write on next line. I am … | |
I am a C++ beginner and I am trying to write a code about an application for dynamic allocation in memory which uses chained hash tables to implement some data about persons iam using a no as a key and a name as my data I defined the class tables … | |
if I get this down, then I'll complete my assignment. I want my program to have the ability that whoever is using the program has the ability to control how many customers a restaurant has. Say Pressing C = new customer. And depending on how many times they press c, … | |
Hello, I am happy to find this forum. I was trying to read a file to matrix matice. The input file looks like this: 7 1 4 5 6 9 3 2 2 0 7 6 8 6 1 2 4 2 9 1 7 2 3 8 [code=c++] #include … | |
How long does it take to count 1 billion? Determine the amount of time it takes the program. [CODE]Int i,j,k, count=0; For (i=0; i<N; i++) For (j=0; j<N; j++) For (k=0; k<N; k++) count++[/CODE] to complete in your programming environment, for N=1000, and 1000. If your compiler has optimization features … | |
I am trying to implement these patters using for loop....I am having difficulties with them....If someone can help, would be great!! I attached the pattern to a Image.... [ATTACH]10180[/ATTACH] I tries this code for the third pattern...I have no Idea how to get them done....can anyone post codes for all … | |
I have this loop i made and just cant figure out why it wont stop running..can some one help ..I just need it to say what decision i made then stop...or display the ol' press any key to exit app..God Bless.. [code=cplusplus] #include <iostream> #include <cmath> using namespace std; int … | |
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. [code] PictureBox^ pct; pct=gcnew PictureBox; pct->Location = Point(240,210); pct->Size.Height= 30; pct->Size.Width= 30; pct->BackColor.Aquamarine; Controls->Add(pct); pct->Visible=true; [/code] i am using visual c++ 2008. after … | |
//I am haing trouble creating this program. There is basically only one part that I can't figure out. I need to match up my array to my string. I need something that will force the first strings in each to equal eachother, then use a counter to match the rest. … | |
I have a class holding a pointer to a templated class: [ class A { protected: Feature<Base>* m_p_feature; }; now I want to derive A with some derivative of Base: class B : public A { public: B() { m_p_feature = new Feature<Derived>(); } }; where Derived is Derived from … | |
Hi, I am new for writing plugins.Dont know how to start.Can any body provide link or sample codes for plugins. | |
Can you tell me which basic operations on a list can cause an use of stack proportional to the size of the list? (I mean, looping on all elements...) I have problems with stack size. Is iterator post-incrementing dangerous in this sense? | |
Can anyone help me fix these?Program displaying and writing symbols to my file... And also after calculating GPA , when choose function read or display all it is illustrated as null....help plz [code=cplusplus] # include <stdio.h> # include <string.h> # include <iostream> # include <fstream> #include <stdlib.h> using namespace std; … | |
I am working on solving several problems and this is one that I came across which I am not sure how to solve. If someone could help me here that would be great. Here is the problem, thanks much in advance: Your boss comes up with the following idea: Move … | |
Hey everyone, I've just a simple question for you. I've an array like a[10] = {23, 17, 35, 67, 43, 52, 97, 83, 73, 29} How can i shuffle the order of this array's elements? (randomly) Thanks for your interest and your help... Have a nice day... | |
Hi there, I tried to use the above compiler for C.For every program I get the following message. I followed the tutorials,but can't figure out what am I missing in order to compile and run programs efficiently.It is not the code,as I have tried a number of programs which run … | |
I am trying to convert an array of longs to an array of chars. There are 1081 elements in the long array. Each element is 4 digits long. Is there a function in C++ that will convert a long something I can store in the array or could someone point … | |
Greetings from a newbie! I'm creating a game of a sort where objects move and collide on a 2D ASCII map ( vector<vector if u will ). I'm having hard time calculating the projectories of ranged weaponry. Not sure if this problem is more mathematical than C++ related, but here … | |
I was told olny the computer / home that the "host program" was in needed to be port forwarded, but you need port forwarding just to use the client too. Base code for client program: [code] //Main.cpp #include <iostream> #include "Socket.h" #include <fstream> #include <string> using namespace std; string getcot(char … | |
Two files be placed , to certain composition of (warehouse of) simple project entering, template calculates inclusive < include (reach; make) > Array and it operation of template with (from) method several instructions of codes ( ) demonstrating main. Task relies on making of new template representing calculator, be based … | |
hello people, I am very new to this forum and its my firs post I want to create a simple client server c++ application for exchange of messages over internet I have written a client server using sockets and is working perfectly on LAN. I am using UDP . could … | |
Hello I have started to study C++ after having worked with a procedural language for many years. I have read a couple of C++ books (hmm, well at least looked into) and some tutorials about C++. I started to prepare a C++ quick reference guide for my own usage and … | |
Hy, I have to develop an application usign Visual C++ 2008 that should handle (open, change cells and save) some Excel 2003 sheets. I am using .NET Framework 3.5 and the COM reference Interop.Excel.1.5. Does anyboby knows how to code this? Thanks. | |
My problem is that when is changed size window or is changed colour of object, it stop to work, not immediately but after short time drawing, I don't have idea where I work with memory or something like this what is responsible for this problem. If you have some idea, … | |
As I noticed everybody says that THE ONLY difference between classes and structs is access mode. But I have noticed that initialization is also different. I mean if we have struct SA{int n;}; class CA{public:int n;} then we can write SA sa = {2}; but we cannot write CA ca … | |
I have to make a guessing game program using CLR Windows Form APP in Visual Studio 2008. The program has to catch excceptions. Im trying to catch an exception if I were to leave the input box called guessBox2 in the program blank and hit the submit button. IM STUCK. … | |
HI, I have been working on this program for a bit now and having a little bit of trouble, I have got most of it but still a few stumbles. Here is the Directions: Write a program that will generate an unknown (between 93 and 139) count of random numbers … | |
i am new in programming in visual c++ can anyone tell that how can i call one form from other form means by clicking on button first form should disappear and second fom should come on screen in visual c++ 6 | |
hi! i've got a problem i can't understand. i hope someone could help me.. :/ i've got this error: syntax error : missing ';' before 'tag::id' on this line in the code: [CODE]Graph :: Graph (char * str) { // constructor... } [/CODE] the decleration of this function in the … |
The End.