51,593 Topics
![]() | |
hi, I am doing a lab assignment for my C++ class and it wants us to use serveral pointer indirections for each variable. The program runs but then crashs and it seems to occur during the second iteration of a for loop in the arrayGet function. I'm not sure why, … | |
Greetings, I'm quite new to C++ and i got a problem with my program. It seperates words in a string using the strtok() function. These words are then put into an array, which means the array can contain multiple same words. I'd like to copy different words from this array … | |
Hello everyone, i have the following code [CODE=cpp]#include <iostream> #include <conio.h> using namespace std; int main() { cout<<"\nPress Any Key To Continue "; getch(); return 0; }[/CODE] it compiles fine on my windows xp using microsoft visual c++ , and i can run the resultant executable file with no problems … ![]() | |
[code=cplusplus] #include <iostream> #include <iomanip> using namespace std; class Matrix { public: Matrix (int =0, int =0); ~Matrix (); Matrix (const Matrix&); void operator = (const Matrix&); Matrix operator + (const Matrix&); Matrix operator * (const Matrix&); Matrix operator - (const Matrix&); int* getMember(int =0, int =0) const; //returns pointer … | |
I am writting a program that needs to access files in MyDocuments folder of the user running the program. I am aware of GetUserName() but the program is being run as a service and so GetUserName() returns SYSTEM. Could anybody help me with how to get a list of all … | |
I have a C++ program I am debugging in Visual Studio 2005 IDE. It uses a DLL. I have the source code for the DLL. Now, suppose I want to debug and step through the DLL. How do I attach this to my current project? Actually, I can already debug … | |
Hi all, Plz helpme out with this error. I am trying to Port my C++ compiler from Sun C++ compiler to GNU gcc 3.4.2 and i am getting below errors..Guys any idea how to solve this. [code] In file included from /sbcimp/run/pd/gcc/3.4.2-32bit/lib/gcc/sparc-sun-solaris2.8/3.4.2/include/c++/bits/stl_algobase.h:72, from /sbcimp/run/pd/gcc/3.4.2-32bit/lib/gcc/sparc-sun-solaris2.8/3.4.2/include/c++/bits/char_traits.h:46, from /sbcimp/run/pd/gcc/3.4.2-32bit/lib/gcc/sparc-sun-solaris2.8/3.4.2/include/c++/ios:46, from /sbcimp/run/pd/gcc/3.4.2-32bit/lib/gcc/sparc-sun-solaris2.8/3.4.2/include/c++/ostream:45, from /sbcimp/run/pd/gcc/3.4.2-32bit/lib/gcc/sparc-sun-solaris2.8/3.4.2/include/c++/iostream:45, … | |
I am using BCB6 so I hope this is the right forum. I am using asyncpro's TApdComPort component for serial communication. I need to send 12 bytes and receive 22. I can send the 12 bytes using putblock(..). But I can't figure out how to reeceive my data. Also, I … | |
hello friends i want to clear screen after inputing data before it displays what ever the program intend to do. is there some function or special character to do that ? secondly i want to increase size of fonts where i type my program. i try to look around but … | |
I hear alot of people saying not use: [code] system("pause"); system("cls"); system("title"); [/code] I think you get what I mean, so I'm trying to make functions that will replace all of these, and for my first installment I'm going to show you how to replace system("pause");. Here is what I … | |
Hi I am newer to programming and need a bit of help with this program. You all have helped me in the past with my programs but this is a very complicated array of structs program and I don't really understand it very well. OK, heres the directions. The distance … | |
![]() | For a given list, I would like my output to have the line "Deleting node with value ..." for each node. My destructor function works for a 2-element list, but for a 3-element list it deletes a certain node more than once, and for a list of any size greater … ![]() |
This is a past exam question that I'm doing for revision. I didn't think this was going to be as tricky as it turned out. I would just appreciate some advice on how I can make it more elegant/professional/etc.. I'm sure this has been discussed before and there are some … | |
I have the following example and need to parse only the numbers from the string: From: EG2594 To: 2594 or, From: EG2594_1 To: 2594 Then I need to add a P to the extracted numbers, so it would end up as: P2594 as my output. What is the best, simplest … ![]() | |
Hi, I generated 10 random numbers ranging from 0 to maxrange to find out the running total to work out the fitness of each chromosome. Then I generated 10 more random numbers which range from 0 to the maximum of running total. The second set of 10 random numbers are … ![]() | |
I am writing a program that calls system( "c:\pathtofile.exe" ) to launch another program. Does anybody have a suggestionon how to make it so the console window doesn't show up. | |
In the following code, the object is not being written into file in line 30 [ICODE]stfile.write((char*)this,sizeof(item));[/ICODE] When line 26 :[ICODE]stfile.read((char*)&ob,sizeof(item));[/ICODE] is hidden the object is written into the file. Please help!!! [CODE=C++] fstream stfile; class item { int code; char name[25]; int price; int qty; public: int getcode() { return … | |
HI, if i have something like this [CODE]char string[16]; std::cin>>string;[/CODE] and i type something and press "Enter" then [ICODE]std::cin[/ICODE]would terminate, how do i get it to terminate when my first key input is "Enter" ? because normally if i do that , input will not terminate and i will only … | |
I was given this problem of finding out the alphabet between 2 given alphabets, and this is the code i came up with....and the problem is that I get an ASCII value instead of and alphabet. For example, when I input AZ, the proper answer should be M but I … | |
Hello Experts I am trying to parse a dbx file . But I won't be able to find the attachment offset,embeded's image offset, mail's offset,mail's size etc. If abybody know DBX file structure ,then please tell me .Its urgent. Thanks Kind Regards vikas | |
Hi, Could u please help me with this issue. I can able to get POPUPMENU while pressing alt and then (Underline char of my main menu). But When i tried for Alt+(underline char) That popup menu is not aappering. Can u please help me to IN WOKE THE POPUPMENU when … | |
Hi.. I'm using VC6++ with window xp.. and my coding is like below.. [code=cplusplus] try { CString szConn; hrResult = m_Connection.CreateInstance(__uuidof(Connection)); if(SUCCEEDED(hrResult)) { szConn = "Provider=Microsoft.JET.OLEDB.4.0;Data source=C:\\PSMotion\\Database\\IO.mdb"; _bstr_t bstrConn(szConn); hrResult = m_Connection->Open(bstrConn,"Admin","",-1); if(SUCCEEDED(hrResult)) { _CommandPtr pCommandResult; _variant_t vtEmpty1(DISP_E_PARAMNOTFOUND, VT_ERROR); _variant_t vtEmpty2(DISP_E_PARAMNOTFOUND, VT_ERROR); sprintf(sql,"DELETE * FROM IOList"); _bstr_t bstrResult(sql); pCommandResult.CreateInstance(__uuidof(Command)); pCommandResult->ActiveConnection … | |
Hello World! (to all of you DaniWeb guys!) I want to build 3D Online Chat but I don't know how to start. Does anyone can tell me how to send message between 2 PC? (An output of this message I want to show in 3D character's shout box.) Right now … | |
How to convert this algo into c++? [CODE]while 9more students) read studentID countexam =0 while(more examination) read exam code ExamID = GetExamID (examcode) Incerement Count exam examlist[count exam]=ExamID; endwhile for (i=1,to CountExam-1) do for (j=i to CountExam) do if (i!=j) Inceremnt conflict value of row exam List[i] and column Examlist[j] … | |
Hi, I have an existing .ocx file which contains a map. I need to open this file in C++ and not in MFC. MSDN help suggested me that it can be done throuch " #import "file_name" " However, the description is not descriptive and helpful. If anyone can provide me … | |
Hi guys I am trying to implement golden section search method to obtain n-th root of any number.I am testing it by finding the square root of 25 in range [4,6].the function to minimise is:[B]x^2-25.[/B] [CODE]#include<iostream> #include<cmath> using namespace std; int fnc(float &,float &); float n,num; int main() { float … | |
![]() | I have been writing my program and everything works like it should unless the user inserts a character then the whole thing blows up... how can I fix this. Is there something I can add to block characters from being added? any help would be appreciated! here is my code: … ![]() |
can anybody give me the cocept of 2d n 3d arrays in c++ i will be very thankful.i am using this type of site 4 da first time but i m sure it will be good. | |
i am new to programming.. i am now facing a prolem on how to turn the value in the combo box by automatically by using visual c++ 6. let's say the value in the combo box is 5, after i click a button, the value will increase to 10, 15 … | |
How to output to an excel file and how to read from it?? i have done the writing part...to use [inlinecode]"\t"[/inlinecode] for moving to next cell in same row and [inlinecode]"\n" [/inlinecode]to move to next row... and is there any special format to save that excel file..because when i save … | |
Hello, I have to create a double linked list array of pointers for the alphabet (one pointer per letter). Ok, so I tried starting by creating a double linked list: [code] struct word{ string newWord; word *next; word *back; }; struct wordList{ word *head; }; [/code] And then array of … | |
can someone help me regarding my program? i am tasked to create a program called string censoring. it asks for two strings then it removes the characters in the first string which are similar to those in the second. Ex: 1st string= new york yankees 2nd string= absolutely result= nw … | |
Is der an equivalent function to srand(),the random number generator, in g++ compiler? | |
I am just beginning in a C++ class and I am having a hard time setting up the code for using a modulus operator. The problem assigned has user input as name and hours worked. The program is to output the name, weeks worked, days worked, and hours worked based … | |
Hello folks, Does anyone know of any links that contain sample code for an FTP server implemented in C. | |
is there a way for me to write OOP programs in c++ for Texas Instruments TI 89 graphic calculator? | |
Dear all In advance, thank you for your help. I am trying to initialize an object in C++ depending on certain parameter. Below is the source code I am using. if(ARG::metrn==metrnSMD) EventStream<complex<Lambda>> evstrTrain(fileTrain, evlsTrain); else EventStream<Lambda> evstrTrain(fileTrain, evlsTrain); if (ARG::FRandomEventOrder()) evstrTrain.SetRandomOrder(true); I am declaring and calling the constructor for 'evstrTrain' … | |
this is my code to convert characters into its decimal form...it is working and the next step is to convert the decimal form to its binary form...how can i do that....???? [CODE]#include<iostream> #include<conio.h> using namespace std; void input(); void process(); int main() { input(); system("PAUSE"); } void input() { string … | |
I have the following code which is working properly, what I'm looking to do is add an additional function to it, but I'm getting stuck. What I need to do is add a function to my class called DigitalTime::interval_since(const DigitalTime& a_previous_time, int& hours_in_interval, int& minutes_in_interval) What this function does is … | |
Hello, I am still working on the self study thing. I have decided to do or attempt to do a project that requires a header files with 2 other source files. The header file was given in the book. It is as follows: #ifndef GOLF_H_ #define GOLF_H_ //golf.h -- for … | |
I'm trying to write some code that will take each individual part of a 2D array and put it into the same part of a different array. Here's the code, tell me what you think!! ^_^ Thanks in advance for any help!! [CODE] bool repeat = true; int a = … | |
I recently saw this function in one of the online test paper i was going through. And i came to know that this is a standard library function but i dont know anything about it. And it is related to some Parent process - Child process kind of things. And … | |
after i give the input the screen disappears all the commands are correct even then it only takes input how i can see outputs?? | |
![]() | What would be a good way to learn C++ online for free. I already found a site that shows me some stuff but I don't think it's the best site out there. Also whenever i compile and run a program it just flashes on the screen for a second like … |
I started c++ a few days ago and I am trying to make this program for my math class just to test myself. This is my code. [CODE]#include <iostream> using namespace std; int main () { int goldennumber; int finalnumber; int ratio; cout<<"Welcome to Easy Golden Ratio Finder!\n"; cout<<"\n"; cout<<"\n"; … | |
How do you search for a string in a system? I am trying to make a program that does a system ping then returns to you only a portion of the results such as only the amount of packets loss. Any ideas on how to do that? What I had … | |
so ... i'm kinda new to these STL ... i wanna make a list of lists ... after spending some time to teach myself how to make a list of char I went one step further with a project I have to accomplish ... so the thing is that i … | |
Hello! :) I have a CMDIChildWnd (CStatusFrame) with a richedit on it. I am resizing the richedit when CStatusFrame is resized. Originally it was.. [CODE=c++] // Code from CStatusFrame PreCreateWindow: cs.style = WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_TABSTOP; cs.lpszClass = AfxRegisterWndClass(CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW, NULL, (HBRUSH) (COLOR_WINDOW), NULL); … | |
can anyone help me with mouse handling in c++. espcially on how to check mouse clicking. i am making a game connect four so if anyone could help me with the code and explaining a couple of functions i would really appreciate it. help required urgently. | |
hi, I need text control . That control must be that nobody can not enter any key from the keyboard and that i use my windows who i creates button to enter the keys. And that keys from my windows when i enter must be visible for the user . … |
The End.