51,592 Topics
![]() | |
I have seen that I can use a variable as the specification for the dimension of a one-dimensional array to be allocated by the "new" keyword. The book I'm reading explains that this can be extended to two or more dimensions but with a restriction, only the left-most dimension can … | |
Hi, I've searched far and wide but I haven't found exactly what I need. I have to programs communicating through named pipelines (windows XP). One is sending strings to another. The one who's recieves inserts them into an array. Now, here's the problem: this program is multi-threaded, each thread has … | |
My boss has recommended a hash table, but I'd like some second opinions as to what you think the best way to accomplish this task is. My problem is that I don't know C++, so I've been learning things as I needed them to finish this project. I'm kind of … | |
plz provide the c program to remove the blank spaces | |
I need to do a lookup to a table in Oracle from a dll. Can anyone tell me what's wrong with this line: pRs->Open(ptrQuery, "DSN=MY_DSN;UID=MY_ID;PWD=MY_PWD;", adOpenForwardOnly, adOpenReadOnly, adCmdText); The code compiles without error, but when invoked by the target application, the application errors out. (It works fine when not calling … | |
Hi guys :) Thanks first for the help, yesterday.. I really did well in my exam :), thanks a lot again :) Well, I guess I need a little bit help in this I have a file, and I want the whole paragraph in the file to be inserted in … | |
Hello! I have got an image and I want to change the value of his pixels and paste it into another image. pixel(r,c): is actual pixel b: changes from 0 to undetermined number, for example 100. The problem comes for example when b=2;I think that the method doesn't understand the … | |
Im writing a code and included many library files (.lib) with it , when i compile all is fine 0 errors and 0 warnings , but when i built i got problems. when using VC 6.0 i got this warning [CODE]LINK : warning LNK4098: defaultlib "MSVCRT" conflicts with use of … | |
Hi All, I work on C++, and I am using an number of hash maps in my code. The problem is that, erasing of all the map iterators does not work, I get segmentation faults. If I dont erase the iterators, then everything works fine. I am afraid if I … | |
Hi all , I have a program I have written for a question , but it has one problem I dont seem to be able to solve , the last part has to calculate the average hours spent on each module , yet it keeps coming up with answers I … | |
Greetings, I'm trying to write a function which gets two pointers as parameters. The first one "points" to the start of the first linked list, the second one is currently on null, but it will later serve as a pointer to the start of another linked list. The function is … | |
Ok, a few questions on fstream with C++ and winsock 1. Is it possible to search all the tagged lines that say Item I.D. for a specific value that is a variable such as CharacterItemID is 108 than search all the tagged lines that say Item I.D. for 108 and … | |
![]() | Hi =) I am very new to c++ and have started messing around with some lines of code, but I am totaly stuck on this one: [CODE] #include <iostream> #include <string> #include <sstream> using namespace std; int main() { int antnames; cout << "How many names do you want to … |
Hi all, the while loop in my code dont seem to be working as i wanted it to. I wanted it to constantly check if new data is available in the sample.txt but curently after the button click it just finished with one try. is it i put everything into … | |
The program i am working on currently need to read a file and write into multiple files. Basically i am supposed to separate all the classes in tat file so i actually added an comment line to the file, i extract the classes according to the comments. Now i would … | |
I 've linked the two files together, main.cpp and myClasses.h, I've declared a variable, but what I'm asking is can you access a variable from myClasses.h? Here's a example of what I got so far: [CODE] //main.cpp #include "myClasses.h" #include <iostream> using namespace std; int main() { ClassOne myClass_instance; s … | |
hello all i don't know what is the problem with this code when i choose a p for prof ........all the objects be prof objects and when i choose s for student all objects be student objects [CODE]#include <iostream> #include <fstream> #include <string> #include <vector> using namespace std; class person … | |
hi friends, I am working with file IO in C++, but there are some serious issues i am facing: 1) Initially I create some files(4 files), if they dont exists. 2) Then I read one file entirely i.e each record within the file, there are 30000 such records - 1 … | |
Is there any way to directly post (using HTTP POST in winInet or using windows sockets) my login information like username and password to web servers like gmail? My query is more general - when we receive the data back from the web server in response to our GET request, … | |
Im able to copy the entire content of say file A to file B but the last line of file B end with several unwanted tttttt. I suspected the number of "t" is related to the number of line if read and written. Any advise will be greatly appreciated. file … | |
I have some number: [code] int i = 43; [/code] I need to divide this number in to two digits. For example - 43, to get a 4 and 3. Help me pls) | |
I just recently started programming about 3 weeks ago and I have to say, I really enjoy it. My question for this would be, what programs would you recommend for a novice programmer to begin writing? Which type of programs did you write? Any advice would be great. I do … | |
Hi, is there a data type larger than unsigned long long int except double? I don't want double or float because I need to keep it as precise as possible. I also need it to be able to do modulus. How would I do this? | |
Hi, I am making a simple screen shot program. I need to be able to capture the entire screen, or if possible, a region of the screen (like a rectangle from point (25, 60) to (300, 456)). I also need to be able to save it to a bitmap file. … | |
My previous step hs been resolved. Now it's on to the next component. As previously stated, I am using a do-while loop with a switch-case. I've figured out how to state the functions that I'm calling to, and it now allows me past the main menu. Once I'm in however, … | |
Hi all. A while back I'd posted regarding a do-while routine, using switch. It appears that my main is working, and my switch.... it just keeps looping around my main menu. I'm not entirely clear on why either. Here is the code. (One responder to a previous post told me … | |
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 … | |
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() { … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
How can I load jpeg image and get the colour value on each pixel using borland c++ 5.5? | |
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" … | |
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! | |
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 … ![]() | |
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 … | |
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 … | |
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: … | |
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? | |
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(); } | |
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 … | |
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 … | |
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 = … | |
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 … | |
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 … | |
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 … | |
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, … |
The End.