49,761 Topics

Member Avatar for
Member Avatar for rajatC

hi! i want to change the icon of an exe file. And the file will be moved from computer so the icon must be embedded in the exe file...is there any way?? the exe file is a daily use application so i want to give it an icon which shows …

Member Avatar for Duoas
0
371
Member Avatar for rajatC

hi friends... i have some doubt regarding the output at the console. what we generally have is that the output is written on the console and the cursor moves always forward. But what if in some special case we want to back track the cursor a few characters of lines …

Member Avatar for rajatC
0
130
Member Avatar for legendarya49

I'm am trying to write a program that will do the factorail of big numbers and yet i still can not figure out why it does not work. when i do the factorail of 5 i get 20 it should be 120 and i cant figure out where the bug …

Member Avatar for JRM
0
88
Member Avatar for Sandman13

im so new here i dont know if this is the right place to ask this or not but here goes>>> i need to learn how to right a code for sum thing and in C++ im so lost on how to do this is there sum1 here that wouls …

Member Avatar for ithelp
0
101
Member Avatar for sweRascal

Hey all, sorry to bother you but I have been wrecking my brain with this issue. I have been programming php for several years and needed some portable console apps so my natural choice was to go to c++. Now I got stuck when trying to create an sql query …

Member Avatar for sweRascal
0
108
Member Avatar for dipthought

I have a code where I use a pointer to access some datablock. Now in some rare cases, some members of the datablock are empty and as a result the pointer becomes dangling. Infact when I print out the address of the pointer, I get something like, address = c0d6940 …

Member Avatar for Salem
0
101
Member Avatar for abeshare

// I want to dislpay my cout in an acsending order by ssn // here is the program [code=cplusplus] #include <iostream> #include <cstdlib> #include <string> #include <fstream> #include <math.h> #include <ctype.h> //Ebrahim Sharif //ECE 370 //1-16-2008 using namespace std; void getPersonalInfo();//function prototypes int Str2Int(string InpStr); long Str2Long(string); void lookupPerson( char …

Member Avatar for Nick Evan
0
119
Member Avatar for Narue

Post your tips for making life easier in C and C++. I'll start: [SIZE=3][B]Standard vector object initialization[/B][/SIZE] The biggest problem with the standard vector class is that one can't use an array initializer. This forces us to do something like this: [code] #include <iostream> #include <vector> using namespace std; int …

Member Avatar for bector
2
8K
Member Avatar for Rehat

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

Member Avatar for Rehat
0
88
Member Avatar for flash121

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 …

Member Avatar for Narue
0
215
Member Avatar for hashinclude

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 …

Member Avatar for iamthwee
0
160
Member Avatar for everlast

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

Member Avatar for everlast
0
133
Member Avatar for ssvetkoff

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 …

Member Avatar for hashinclude
0
62
Member Avatar for complete

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 …

Member Avatar for Byaptia
0
120
Member Avatar for RohitSahni

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

Member Avatar for sngpt.iitr
0
132
Member Avatar for nu2cpp

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 …

Member Avatar for nu2cpp
0
533
Member Avatar for peeta

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 …

Member Avatar for peeta
0
147
Member Avatar for #include<DAN.h>

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 …

Member Avatar for Duoas
0
588
Member Avatar for radskate360

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 …

Member Avatar for jmvr_danga_14
0
164
Member Avatar for icewizard

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 …

Member Avatar for icewizard
0
244
Member Avatar for phalaris_trip

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 …

Member Avatar for phalaris_trip
0
85
Member Avatar for sanclan

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 …

Member Avatar for iamthwee
0
216
Member Avatar for M.A.H

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 …

Member Avatar for iamthwee
0
2K
Member Avatar for ssvetkoff

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.

Member Avatar for ssvetkoff
0
105
Member Avatar for Karkaroff

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 …

Member Avatar for Karkaroff
0
132
Member Avatar for hashinclude

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 …

Member Avatar for Narue
0
263
Member Avatar for number87

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 …

Member Avatar for ShawnCplus
0
87
Member Avatar for vikasmailsu

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

Member Avatar for vikasmailsu
0
198
Member Avatar for appu.puli

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 …

0
41
Member Avatar for shizu

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 …

0
57

The End.