49,756 Topics

Member Avatar for
Member Avatar for AqAbAwE

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.

Member Avatar for AqAbAwE
0
72
Member Avatar for daviddoria

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 …

Member Avatar for Radical Edward
0
93
Member Avatar for kasippu

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 …

Member Avatar for Abzero
0
84
Member Avatar for mussa187

[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 …

Member Avatar for VernonDozier
0
95
Member Avatar for toolbox03
Member Avatar for lahom

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

0
76
Member Avatar for Kadence

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?

Member Avatar for Ancient Dragon
0
53
Member Avatar for joshmo

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 …

Member Avatar for joshmo
0
120
Member Avatar for CoolGamer48

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: …

Member Avatar for mitrmkar
0
83
Member Avatar for jmines

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?

Member Avatar for Salem
0
158
Member Avatar for v@$@nt

please help me in writing a code to implement stack using arrays , does stack follow LIFO or FIFO principle?

Member Avatar for n1337
0
110
Member Avatar for computer engW

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 …

Member Avatar for computer engW
0
178
Member Avatar for shobhit saxena

hello all, can somebody tell me what's the use of protected default constructor & protected copy constructor in c++.

Member Avatar for Ancient Dragon
0
51
Member Avatar for sieghart0123

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 …

Member Avatar for sieghart0123
0
126
Member Avatar for daniel88

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 …

Member Avatar for daniel88
0
138
Member Avatar for Nemoticchigga

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: …

Member Avatar for Ancient Dragon
0
109
Member Avatar for bonnie1234

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 …

Member Avatar for Ancient Dragon
0
104
Member Avatar for K1Kingy

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 …

Member Avatar for Salem
0
64
Member Avatar for Mehwish Shaikh

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); } } …

Member Avatar for VernonDozier
0
82
Member Avatar for petzoldt01

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 …

Member Avatar for petzoldt01
0
353
Member Avatar for daviddoria

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 …

Member Avatar for Duoas
0
108
Member Avatar for Black Magic

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 * ** *** **** ***** ****** ******* ******** ********* ********** …

Member Avatar for William Hemsworth
0
98
Member Avatar for daviddoria

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]

Member Avatar for Narue
0
144
Member Avatar for computer engW

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 …

Member Avatar for computer engW
0
97
Member Avatar for Run.[it]

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 …

Member Avatar for Run.[it]
0
178
Member Avatar for abdullilah

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 …

0
48
Member Avatar for daviddoria

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 …

Member Avatar for Narue
0
103
Member Avatar for joma4real

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

Member Avatar for Narue
0
53
Member Avatar for Nemoticchigga

[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 …

0
61
Member Avatar for DREAMER546

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 …

Member Avatar for DREAMER546
0
128

The End.