49,756 Topics
![]() | |
lets say I have a class named MyClass, and a variable named val, what does the following statement mean? i know its dynamic allocation, but what does the ** indicate? MyClass **p1 = new MyClass*[val]; thanks for your help. | |
I have about a 1gb data file that needs to be read at the beginning of my program. This takes about 2 minutes to do. I feel like the answer is "no way", but here is my question. In matlab, there is the concept of a "workspace". I can ready … | |
01. ) during sorting , if we wish to swap the items in 2 positions , we simply swap the pointer values and leave the main data table unchanged:: what is a possible advantage and disadvantage of doing this .. ?? 02. ) what would be the effect of incrementing … | |
[B]Okay i thought i have solved the problem i had obviusly with ur help guys but i guess i was doing it wrong, here is what i am suppopse to do:[/B] BACKGROUND This is the same as the DNS pointer problem except ypou must structure your code into a class … | |
hi how can i move from one dialogbox in one project to another one(dialog box)placed in different project? for example...press abutton in dialog A -> move to dialog B.. any suggestions any way that could help would be appreciated thank u all | |
Are there any functions to calculate, or common techniques to estimate, how much memory a C++ script is consuming at a given moment/place in the code? Maybe some built-in function that keeps track of bytes used? | |
am trying to delete an element from my list but am having a problem..i have managed to position my pointers well but av failed to to the actual element. i.e user enters a number to be deleted from the list..here's the bit of the deleting code that i have been … | |
Hey, when I run this code: [CODE=Cplusplus]else if(strcmp(buffer,"#itemSprite") == 0) { char* sprite_filename = ""; int trans_r; int trans_g; int trans_b; int width; int height; int numFrames; int numCols; int frameChangeDelay; fscanf(file,"%s",sprite_filename); fscanf(file,"%d",&trans_r); fscanf(file,"%d",&trans_g); fscanf(file,"%d",&trans_b); fscanf(file,"%d",&width); fscanf(file,"%d",&height); fscanf(file,"%d",&numFrames); fscanf(file,"%d",&numCols); fscanf(file,"%d",&frameChangeDelay); item->SetSprite(sprite_filename,D3DCOLOR_XRGB (trans_r,trans_g,trans_b),width,height,numFrames,numCols,frameChangeDelay); }[/CODE] I get an error on this line: … | |
I want to change the background color of the output screen in Dev-C++. How can I do that? I searched the Internet but didn't find any. Any help on which function should I use? | |
please help me in writing a code to implement stack using arrays , does stack follow LIFO or FIFO principle? | |
Here i have problem with ctype.h library .I think i use correctly,but i ahve an error on it. This is the code. [ICODE]#include<iostream> #include <ctype.h> using namespace std; int main(){ char letter; int num; int isdigit(int letter); int isupper (int letter); int islower( int letter); int small=0; int capital=0; int … | |
hello all, can somebody tell me what's the use of protected default constructor & protected copy constructor in c++. | |
I'm new at C++ programming and am working on an assignment. I've managed to compile my codes alright but got an error while testing the program. The error surfaced halfway through viewing details of a linked list, where suddenly, the program started printing weird characters while the computer emit beeping … | |
Hi guys! I am currently having trouble in the final stages of an assignment which involves linked lists and dynamic arrays. The assignment involves adding books to a library. This means that each record has a title and one or more authors. I have worked out what I think was … | |
I am using the begininvoke and endinvoke methods in visual studio 2005. [CODE] private: System::Void button_run_Click(System::Object^ sender, System::EventArgs^ e) { AsyncCallback ^ac = gcnew AsyncCallback(&InvokeTest::Form1::delegate_function_callback); delegate_function ^df = gcnew delegate_function(this, &InvokeTest::Form1::function_to_invoke); df->BeginInvoke(ac, df); } private: delegate int delegate_function(void); public: int function_to_invoke(void) { label_status->Text = "Running"; //label_status->Text = "Stopped"; } private: … | |
i really need help with this code. i am writing a truss analysis program and i'm confused with my push button. in my GUI i have 2 edit boxes and a push putton, when the information is entered into the edit boxes and the push button is pressed, the truss … | |
I have just got a laptop cooler that has 3 fans built in to it. It plugs in through the usb. What i am trying to do is make a small c++ program that is able to start and stop the usb device. It would make it a lot easier … | |
Following code is implementation of stacks.. but its giving two errors [code=cplusplus] # include<iostream.h> # include<conio.h> # define SIZE 20 class stack { int a[SIZE]; int top; // Top of Stack public: stack() { top=0; } int overflow() { if(top==SIZE) { return (1); } else { return (0); } } … | |
Im currently trying to work with a program that reads raw DV and dumps each frame in the form of a PPM file. I need to read the PPM's into OpenGL Textures and display them. But that is not the problem. The program has the ability to dump all of … | |
I have a function: void CreateCostGrid(vector<ScanPoint> &Data, int whichcol, vector<LiDARScan> &LiDARGrid); That I call like this: CreateCostGrid(TestScan.getColumn(GoodCols.at(testcol)), GoodCols.at(testcol), ModelScans); But I get this: error: initial value of reference to non-const must be an lvalue CreateCostGrid(TestScan.getColumn(GoodCols.at(testcol)), GoodCols.at(testcol), ModelScans); (There is an arrow underneath the T in TestScan, i guess indicating that … | |
Code Should Explain It self.. [CODE=C++]#include <iostream> using namespace std; int main() { unsigned int digit; for( digit = 0; digit < 10; digit++ ) { /* I WANT THE OUTPUT TO CARRY ON UNTIL DIGIT == 10 & OUTPUT * ** *** **** ***** ****** ******* ******** ********* ********** … | |
I'd imagine there is a much better way to do this... [code] vector<double> Model; //code to fill Model vector<double> V1; for(int i = StartModel; i <= EndModel; i++) V1.push_back( Model.at(i) ); [/code] | |
Hi, When i write any code has if else statement , and run it na error appeatrs and say that else doesn't match with if [U]or[/U] illegal else without matching if. I don't know where is the problem exctly ,and you should know that i don't put } in these … | |
Im trying to carry out input validation on a piece of code and have come across an issue. Basically for the 1st input I used getline for the string and then for the 2nd input I use cin for the integer. I am aware you can convert the integer from … | |
which hide text and audio please help me code : public void Hide(Stream messageStream, Stream keyStream){ byte[] waveBuffer = new byte; byte message, bit, waveByte; int messageBuffer; //receives the next byte of the message or -1 int keyByte; //distance of the next carrier sample //loop over the message, hide each … | |
I want to do something like this [code] #include <string.h> #include <iostream> using namespace std; int main() { MyFunc("test"); return 0; } void MyFunc(const char* Filename) { cout << strcat(Filename, ".tst") << endl; } [/code] but it tells me that my const char* cannot be used where it is expecting … | |
Please I need a site where i can download Visual c++ free. I prefer the offline version of this download. Or give me a guide line on how i can use borland c++ to create a form for my program. You can email me at [email removed] Thanks | |
[CODE]String^ comPort = "COM" + this->RS232CommPortNum->Value; int baudRate = Convert::ToInt32(this->cbBaudRate->Value); com = gcnew SerialPort(comPort, baudRate); try { com->Open(); } catch (...) { ::MessageBox::Show("Invalid Port"); }[/CODE] How do I handle this excepion thrown when the com number is not valid? When I run the release version it has an error when … | |
hi i'm having a problem when i use pointer to pointer i've tried my best to make this work .. but it didn't i've got a run time error! PLEASE .. Please .. please i need help :'( if any one have tutorial about how can i work with pointer … |
The End.