49,761 Topics

Member Avatar for
Member Avatar for berge

Hi guys. I wrote a Win32 C++ program that uses C++ streams to open and read files. I log on a machine using a specific user (USER1) and password. It is supposed that this user has access to files spread across the network (file sharing). Therefore I'm using sentences like …

0
54
Member Avatar for Jennifer84

I wonder if it is possible to call the function void OneFunction() inside the buttoncontrol. [code] namespace Test1 [COLOR="Green"]{[/COLOR] public ref class Form1 : public System::Windows::Forms::Form [COLOR="green"]{[/COLOR] private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { // Is it possible to Execute/Call OneFunction() here ? } [COLOR="green"] }; }[/COLOR] void OneFunction() { …

Member Avatar for Jennifer84
0
110
Member Avatar for Jennifer84

I am trying to write an Interpreter but are not really sure about the methods that are used for this. What I think I have understood is for the example below, I will have to parse out 3 things from the string. "Number1", "==" and "2" and associate these to …

Member Avatar for Jennifer84
0
159
Member Avatar for scratchnloved

i have a few questions: 1. is there a way to change the window attributes on a console application? 2. is there a way to send commands to other windows/applets, like changing their attributes or closing them? 3. is there any way to cut console input to 1 keystroke, like …

Member Avatar for scratchnloved
0
117
Member Avatar for pradhan.nc

Please refere the following program #include<iostream.h> #include<conio.h> using namespace std; int main() { [B]int a[10]={1,2,3,4,5,6,7,8,9,10}; cin>>a[-1]; cin>>a[15];[/B] cout<<a[-1]<<" " <<a[15]; getch(); } To my surprise this code works perfectly ok. I thought it will give me some compiler error or runtime error as I am [B]writing in the array index …

Member Avatar for Salem
0
159
Member Avatar for jovirey

Hi Hope you guys could help me with this. We were given this assignment that implements the "Hello World" CS but I'm having problem with my compiler. Obviously the given program exercise was written in old C running in linux operating system. That's why once compiled using Windows it does't …

Member Avatar for Salem
0
147
Member Avatar for Vallnerik25

Hi everyone this is my first post on these forums and I hope that someone can clear up a simple question for me...Right now I am reading Ivor Horton's Beginning Visual c++ 2008 and in chapter four he gives an example program for finding prime numbers using pointers and a …

Member Avatar for Vallnerik25
0
476
Member Avatar for adamj2

Hi there, What I am trying to do is implement my own sequence number program. I have a sequence number i.e 0001 and then I try to convert this to a binary string in byte format of 4 bytes: 00 01 00 00 And then I am appending this in …

Member Avatar for adamj2
0
436
Member Avatar for totaljj

How can I load jpeg image and get the colour value on each pixel using borland c++ 5.5?

Member Avatar for William Hemsworth
0
97
Member Avatar for Nemoticchigga

I am trying to open 2 forms when I start my vs2005 project. The main form, and a second form whose class is created, and then ->show. It shows both forms, but you can control either one. What I want is the main form to be "locked" until the "OK" …

Member Avatar for Nemoticchigga
0
299
Member Avatar for driplet

Can any body tell me how to change a Cancel button to Ok button after a process finished? (maybe just change the caption of the button? I guess) Thank you in advance!

Member Avatar for mitrmkar
0
91
Member Avatar for &rea

Hello, I have got a problem with an initialization. [code] #define TAB 1000 int table_collision [][TAB]; void function() { for(int i=0;i<2;i++) { for(int j=0;j<TAB;j++) { table_collision[i][j] = 0; } } } [/code] When I look each value I see that the initialization doesn't work. For example table_collision[0][0]=20125560 table_collision[0][1]=20133568 table_collision[1][103]=1429512 there …

Member Avatar for jencas
0
77
Member Avatar for sugantha

Hello...I wanted to install kdevelop on my fedora 8 PC ....so I did "yum install kdevelop".It installed fine. When I tried compiling a program it complained of missing g++ and gcc so I did "yum install gcc-c++" and made the PATH variable point to gcc34. Now when I try to …

Member Avatar for sugantha
0
251
Member Avatar for ninjaneer

Calling any multi-thread wizards. Here is a copy of the relevant parts of my main function... [code] CWinApp theApp; [COLOR="Red"]//the application's handle? not sure...[/COLOR] using namespace std; UINT callProcessThread(LPVOID minutesSpent); //worker thread function, process output UINT initializeProgram(LPVOID flag); //worker thread function, load MCR void inputCalculateOutput(void); // function that sorts data …

Member Avatar for ninjaneer
0
459
Member Avatar for QuantNeeds

I have a problem. I need to pass a non-static data member in one class (class Disks, data member disks) to another class (ToH) to its static bool function, so I can test that value. Here is my error: : error C2597: illegal reference to non-static member 'Disks::disks' My code: …

Member Avatar for mitrmkar
0
142
Member Avatar for camproject

I have changed the dialog's background color using WM_ERASEBKGND. But how to give the same color to the menu bar in the dilaog?

Member Avatar for Nick Evan
0
40
Member Avatar for anuizath2007

can u pls tell me whr i have gone rong------i have got 2errorz... #include<iostream.h> #include<conio.h> void main() { cout<<"\n\n\n\tPATTERN\n\\n\n\t" ; for(int i=1; i<=9; i++); {for (int j=1;j<=i; j++); cout<<i; } getch(); }

Member Avatar for Nick Evan
0
129
Member Avatar for Rondar

Hi, I'm generating random number values between 1 and 100 in 6 different listboxes in a 100ms timer. I want to save the items in the list boxes whenever i press a button to 6 different text files however i couldn't figure how to reach the items of a listbox …

Member Avatar for mitrmkar
0
241
Member Avatar for Synthuir

For example, in a simple console application: Would it be possible to have a user enter text, the code then interpets it's value in Unicode (I guess 8 would be the simplest), then takes the Unicode value and outputs (or stores in another variable) the result? I guess this would …

Member Avatar for Ancient Dragon
0
117
Member Avatar for integer*09

Hi all, I need some help on creating a file with name from user input like from textbox. i have the following code with the filename in textBox2->Text but i dont know how i can get it done. [CODE]string::size_type j = line.find_first_of( " \t", iter ); string found; found = …

Member Avatar for integer*09
0
160
Member Avatar for klay.martens

Hi all, Could not work out if this belonged in the c++ forum, or the python forum.... Basically, I am writing an application in c++ which embeds python. The annoying thing is that I have no way of knowing in advance what version of python will be installed on a …

Member Avatar for klay.martens
0
167
Member Avatar for SteveDB

Hi all. I have found some tutorials online, I believe they were from some university classes, and one from a guy named Juan Soulie. I seem to have solved the bulk of my issues, yet have one last one-- that I can identify. For some reason that I still don't …

Member Avatar for SteveDB
0
248
Member Avatar for wcmport

my program is supposed to be an 11 X 11 grid where a mouse is placed on the center square. I am to count all the squares touched (or untouched) until the mouse has occupied every square. I also need to count the number of times the mouse touches the …

Member Avatar for wcmport
0
80
Member Avatar for FTProtocol

Im trying to send text to the place where you type messages in an msn conversation but i cant seem to do it. [code] { char buffer[MAX_PATH]; char *message = "hello"; sprintf(buffer, "%s", message); GetWindowText(hwContact, szContact, 256); strcpy(&szContact[strlen(szContact)], " - Conversation"); //GetWindowText(hwMsg, szMsg, 256); //strcpy(&szMsg[strlen(szMsg)], ""); HWND fcContact = FindWindow(NULL, …

Member Avatar for TheBeast32
0
146
Member Avatar for Brent.tc

Hi, I need to know how (if it is possible) to determine the sizeof a function... [code=c++] #include <iostream> using namespace std; int theFunction(); int theFunction() { int x = 0; return x; } int main() { cout << sizeof theFunction; cin.get(); return 0; } [/code] The above does not …

Member Avatar for Duoas
0
94
Member Avatar for wcmport

I have written code that is supposed to be an 11 X 11 grid. A mouse is placed on the center spot and until such time that it touches each and every square, the program will continue to run. I also need to count how many times the mouse touches …

Member Avatar for wcmport
0
108
Member Avatar for QuantNeeds

Well here is my biggest jam of the day: 1) I am not sure if I am using the test method successfully in this program. I need to test the recursion to make sure it’s working accurately. I am not sure how to test this before it prints because I …

Member Avatar for QuantNeeds
0
1K
Member Avatar for Q8iEnG

Hi developers :) Actually, I'd like to introduce myself first, I'm Mohd. *Computer Engineer* still student :/ Actually, I really like this community, and I think I'll be active in the C++ section as I like it xDD back to my question :) Please can anyone help me doing this …

Member Avatar for Q8iEnG
0
114
Member Avatar for n00b3

DLL Global Object Constructor String Error Hello, This one has really got my head spinning. I cannot figure it out. I have a c++ console application that loads a dll. In that dll there is a global variable that is a user defined object. Upon the dll being loaded the …

Member Avatar for n00b3
0
209
Member Avatar for totaljj

I don't have graphics.h and library. I could not find on internet. My project consists of loading images and define a grid on the images to manipulate. Which way is the best to do? I want to keep up with Borland because I wrote some code in it.

Member Avatar for totaljj
0
81

The End.