Main Topics
Browse All Topics add the following operation to the class orderedLinkedList:
void mergeLists(orderedLinkedLi
{
//this function creates a new list by merging the elements of list 1 and list2
...
I have experience with programming Mac when ThinkC was the only option for C++. Recently I have been asked to convert a Windows C++ program to later Macs running OS X. I know that Xcode will compile C++ code, but I wonder how easy and effective...
I have written a wrapper class around the std::list template.
I have not inherited from the std::list for many reasons; one of them being it has no virtual destructor.
My reasons for doing this are valid, and I will not go into them here....
I have been asked to write a DLL that exports functions through __stdcall. I'd really like to do this using Visual Basic.NET (2010 currently) as that is my preferred programming environment.
I've spent quite a long time searching for samples...
The epub e-book format requires that a 20 byte "mimetype" be the first file in the collection and that file must not be compressed. Currently I am using these C++ lines:
struct zip_source *mime_file ;
mime_file =...
I have an application that was made by one of our consultants using lightswitch.
- Application was imported to our website without any errors
- The application pool it uses a custom domain account. Application pool authentication for the...
I usually use to compile my C/C++ files under Linux by using g++ and by adding libraries reference from command line.
At the moment, i have to compile and build a Visual Studio 2010 Premium project and I do not know how to add external...
I'm writing a mobile robot C program which reads data from a serial port to check some sensors and then try to load a joypad to control two servos.
Since i'm using a blocking read to acquire data for sonars from serial port, i can't get input...
I have been programming in VB & VBA for years, but now fancy a new challange. I've always wanted to learn C++, because of the possibilites it gives to a developer. My ultimate objective will be to create cross-platform database applications,...
Hi there...
I have this code to insert data into the array:
I think I'm doing something wrong. Basically I need an array that would have 2 columns 1 for ticket id and the other for account id. Then i need a code to get those values out...
Hi
I have an application compiled with Visual C++ 6.0 which I am trying to run on a newly configured Win7 Pro computer (32bit)
I am getting a failure "The program can't start because MSVCR100D.dll is missing..."
First I tried running...
Hello Experts,
I'm looking for a VBA code that would let me open any directory on the file system, loop through all the files that meet certain criteria (eg. *.doc) and then list some of their metadata in an Excel sheet. Something along the...
I am trying to write a program that inputs a string and outputs the series of ICAO word that would spell it out. For example:
Enter String: program
Phonetic version is: Papa Romeo Oscar Golf Romeo Alpha Mike
I am having a brain fart or...
I am trying to learn how to subclass an edit control and intercept messages.
I am getting errors, and cant figure it out! Any ideas?
I'm starting a development project and would like to know: How to name my variables, data fields, modules, etc.
What are the most sensible ways to name objects, etc.
Surely someone has a clear answer.
I have a small C++ server and a java client. I send data from the client to the server. The recv() function of the server side does not receive the the data. I receive the size -1. But the otherway about works well (i.e. from server to the...
Is there an ADO section on the tool palette of Embarcadero XE2 C++ Builder compiler ?
If not then is it an optional component ?
I have just read an article on encapsulation on wikipedia:
http://en.wikipedia.org/wi
It says:
"Encapsulation is to hide the variables or something inside a class, preventing unauthorized...
Hi,
I have some code that gets the local MAC address (Courtesy of codeguru) and displays it in a command window using 'printf' (Unsigned char). I am trying to implement that into a dialog based application, and I would like to know how to...
#include <iostream>
#include <map>
#include <string>
main(int argc, char* argv[])
{
std::multimap<int, int> test;
test.insert(std::pair<int,
}
CC mapTest.C
"mapTest.C", line 51: Error: Could not...
Hello fellow experts. I have on my spare time been trying to create a FIR Filter with FFT Convolution, with the following code:
Here what i do, since *input only holds one sample, is store and cout up until i have 1024 samples which i...
I did..
Doesn't seem to work..
Hi,
Summary: (MS Windows environment.) When running an application from the Microsoft Virtual PC, the disks on the real computer are accessed via \\tsclient\c\, \\tsclient\d\, etc. How to get the real name for the "tsclient"? Or better, how...
Dear Experts,
I would like to create a so (shared object file) using C++ in Linux such that all the dependency libraries are already included in it. (will be compiled by gcc) What I want to achieve is even the dependency libraries lacking in...
Hi Experts,
char* pszFind = strstr(CStr()+uStartIndex,
I got the following error :
cannot convert from 'const char *' to 'char *'
I need help tp resolve this problem ?
Thanks,
Hi all...
I'm busy with a pretty simple C++ app using QT / Netbeans / Mingw and I'm running into a little problem.
The app is used to sync data on a users local PC with a DB on a web server. When the user starts the app, it starts a thread...
Hello guys,
All that I have from this site is the project to be compiled, but I don't know how to do this and all that I need is the newest dll.
http://hunspell.sourceforg
Maybe here there are some information that can help you
...
Hello,
how can I format/convert a time_t info into a unicode CString?
Ingo
Please, can anyone convert this code for me?
I don't know so much about C++, so I need to convert this code from C++ to delphi:
Thank you...
I have a user that is editing .PDF files; copying data from one file to another. Everytime she does so, the program crashes with several errors:
#1:
Event Type: Error
Event Source: Application Error
Event Category: None
Event ID: 1000...
I have a VC++ 6.0 dll that connects to an oracle database using the CDatabase/CRecordset classes. I am trying to suppress the Oracle/ODBC popup error dialogs when the code is running on a server, since no one is there to click "ok" to dismiss...
Hi Experts,
I'd like to know if it's possible to call a c++ library from within c#? The C++ library is not managed - it's native code.
Thanks!
Mike
My MFC app has a modeless dialog. I'd like to know when the user clicks outside of the dialog (at which time I'll hide, but not destroy, the dialog). I'm not receiving the WM_KILLFOCUS message.
I used the ClassWizard to handle the WM_KILLFOCUS...
Hello,
I create multiple threads. I know using static mutex locks we can synchronize threads accessing the data. My requirement is that if 2 threads simultaneously accessing a particular object should be locked otherwise no locks should apply. ...
I have an MFC application written in MS VC++ using version 6.0 IDE. I recently added a bit more code to it, and now I get this warning when I build in DEBUG mode:
warning LNK4084: total image size 268787712 exceeds max (268435456); image may...
i'm trying to include the DLL of MFC inside the EXE of my application but i'm still getting this error message when i try to run my application in an XP Virtual Machine:
"This application has failed to start because of mfc100u.dll was not...
Greetings all,
I've been hitting my head against a few walls because I don't know enough about the different options to know that my choice of development environment will be the right one. As only a moderately capable programmer, it will...
int _tmain(int argc, _TCHAR* argv[])
{
const char *p="Hello";
p="Happy";
cout<<p<<endl;
return 0;
}
How does memory management concept works here. Will the NULL added at the end of the word? if So why?
Hi:
I have a text file, extracted from a database. It is a set of instructions for a saw.
Note that column eight, beginning 169... changes from 169022 to 169023, etc.
Is there any way of breaking the file at each change of batch; creating a...
I have built my 32-bit windows application with the LARGEADDRESSAWARE linker option. I then run this application on a win7-64bit OS PC. Watching Task Manager and keeping an eye on peak memory utilization by my application's process, I see that...
How can I add folder links to "Favorites" in windows 7 explorer using C++.
I need to add some folder shortcuts to explorer window favorites list. So, user can see easily those folders from the explorer window quickly
I am using C++...
I am fairly new to vc++ and right now I have an opaque dll that I need to use to export functions into c#. So first I used dumpbin to verify whether the functions are indeed exported functions. Now I am using p/invoke in a console application...
I'm developing a mobile robot application and i'd like to add a text to speech function which let the robot "talk" with the humans by reading some text strings which i'll pass to it.
For example, since my robot has a sonar network, i'd like to...
Hi,
I am developing an anti procrastination tool. The tool is supposed to block access to distracting websites such as Facebook. Blocking should work using asterix notation:
website.com
website.*
anything.website.com
anything.website.*...
friend BinaryStream& operator<<(BinaryStream &bStream, const std::string& inString );
BinaryStream& operator<<(BinaryStream &bStream, const std::string& inString )
{
std::string tempString(inString);
**** ...
Hi Experts,
Is there a secure way of converting string to int. I can use atoi( ) but, I am not sure if this is secure.
I have bunches of models that I have made for 3D Game, I am trying to get those models in DirectX, I am using C++.
I want a way that will not allow the end users to modify or replace the model, I think if I used .x files the end user might be...
I am using these components for D7: http://www.btframework.com
At...
I have a huge sphere made in 3Ds max, I am trying to display it in DirectX (using C++), however I tried to set the texture in 3Ds to "2-Sided" so the sky texture appear inside the sphere as well but text texture doesn't appear inside the sphere...
I was under the impression that using a virtual base class allows a single instance of the base class for multiple instances of the derived class ? The following code is a simple illustration which appears not to work. Steppin through the code of...
I inherited some very old and messy MFC/C++ code. It is a dll being called from VB6.
In a nutshell...
class CMyCollection : public CTypedPtrArray<CObArray, CInformation*>
{
// "Where" and "Orderby" are SQL.
VARIANT_BOOL...
I have a client application and I'm adding support for IPv6. It's works fine with IPv4. I'm attempting to change/modify the connection code to support both IPv4 and IPv6 addresses. Here's what the code looks like.
Notes:
1)...
Ok I've got a c++ project that I want to break down into properly organized header files but the help has me confused
Here is an example i found on the internet:
Date.h:
Date.cpp:
Ok my issue here is that there is actual code in...
This shouldn't be this difficult....
I have a global variable:
I want to do some debugging, and MessageBox the value sometimes.
So, I init a CHAR with an extra spot for the terminating 0, right?
then I assign that to the INT...
Hello, we're getting the hang of embedded linux, and we have a call to the POSIX command (in unistd.h) "write" that sometimes returns -1 indicating failure, and we have no idea why (happen to be writing to a USB port).
So I did a little...
Hi Experts,
I am experimenting with how memory is allocated on the heap. It appears, when I do malloc back to back, the first one returns an address in one page, and the second one returns an address in another page(4096 bytes page size). I...
the read() function in the stringstreram class returns a istream& type. So if I do a call like this...
std::istream readStream = mDataStream.read(buffer, buffersize);
I am getting a compilation error "synthesized method...
Hi all,
I'm having difficulty understanding how I can show the date and time as a label caption (or 2). I know this is probably a very simple exercise but I'm still learning how to use Borland C++ builder and I've spent hours trying different...
http://www.experts-exchang
My question was answered in the thread link above, but after googling it and researching it I don't know where to start.
Also I have another question,...
I'm have a SWIG generated dll and java libraries. I need to be able to reload the library after it's been used, I know it's not the ideal situation and I should be looking to fix what ever is in the native file but I've inherited a project with...
Is there some sort of macro or something that I could use to make working with pointers more verbose using them becomes more second nature? I have no problem getting mixed up with references in other languages. It seems like I waste time...
hello,
I want to make these conditions :
If a user is member less then 5 years then the price is 135
if a user is member less then 10 years then he gets 10% discount
if a user is member less then 15 years then he gets 15% discount
if a...
Dear Experts,
I am looking for a technique in OpenGL that I can use in order to map color points on a surface.
Each point is defining a display color and three coordinates (X, Y, Z).
The surface on which to map those data is built from all the...
I'm moving my project from VS 6.0 to VS2008. I can't build one DLL because of a series of errors that I don't understand.
This compiles without issue in Visual Studio 6.0, but gives this big mess in VS2008. Can someone explain? Thanks...
...
Check by name if a window is active & If the window is inactive give it focus.
I'm trying to find a process or window outside my form that's currently active.
Please provide me with an article or set up set source that will help me know how...
hello,
I would like to generate a random phone number but im not really sure if there is a specific format i should follow.. i know its area code for the first three digits but after that im not sure.. is all random or not?
I am trying to show a simple REGISTER dialog from my main ( dialog ):
Here is my main Dialog, which works well! So when the user clicks the IDOK button ( I realize it should be named something else ), I would like the REGISTER dialog, named ...
I have a window in my C++ app that I use to draw something. I'll call this "something" a "model". My window is NOT a perfect square. It is wider than it is taller. It's about 4 times wider than it is tall. I am having trouble wrapping my...
I have a function that returns a DWORD type:
I simply am trying to test the return value in a MESSAGEBOX... and with NO LUCK!
Stuck again on this type conversion... ugh
I am looking for sample code to load .x file model into DirectX.
in c++ we are using a sybase PowerBuilder IPB_Session object.
when we call session->Release() or session->PopLocalFrame() in the destructor
we are getting an Access Violation error
(Session is not null)
anyone have any ideas or ever see...
I'm having some problems with g++ and the compiling process for a C/C++ program which use Bluetooth libraries under Ubuntu.
If i use gcc, it works fine with no warning; on the contrary, if i use g++ i get this warning:
warning: taking address...
I have an application written in MS VC++ in version 6.0 IDE. It is time for me to turn it into a 64-bit App (mostly because I sometimes need to deal with large data and I'm getting close to memory limits within my 32-bit app).
What is the...
Hi am trying to compile the below code using visual studio 2010
template<class E> inline
void insertId( std::set<E>& s, E e )
{
if( e )
s.insert( e );
}
void GrammarGenerator::insert( ASRS& asrs,
GramStr whatStr,...
Having difficulties with understanding strings and chars in C++.
Please help me , correct me when applicable....
Define a string , which WORKS! (notice my short lived excitement)
OKAY, so I have a buffer defined with 5 chars...
I have a function like:
char testData[256] = "This is my test data";
bool dataReturn(void * data, int nSize)
{
// put testData into data
return (1);
};
and I want to put some data into 'void * data' from within my function and have...
Software: Visual Studio 2010 + Team Foundation Server standard
Hi,
everytime, when one of our developer loads a solution, the sln-file and all vcxproj-files are automatic checkout by the TFS, but there is no difference between the local...
I am trying to port some C++ Builder code into the latest Embarcadero product C++ Builder XE2
The code uses previous STL templates but no longer works in C++ Builder XE2.
looking at the <map.h> header for stl would indicate that a #define...
How do you find out if a window has lost focus? & If the window has lost focus how do you refocus it?
hello there,
I have a lot of lines in a text file with one line per line like this.. sample
thomas|smith
bob|smith
dan|lois
ben|foster
I would like to know how can I make a little c or c++ app that can read the data from the text file...
Hi Experts,
I have the code below. If I have 100 items in my vector, I'm only getting back 29 of them when i look at the result of oss.str().... is there something wrong with this code? Thank you!
The following code snippet when run, gives a value for numbytes of 3472 decimal, even though I am sending 20000 bytes (the code I use for sending is also given).
how do I check that all the TCP data has been received and is ready to read? I...
I'm trying to get my app to work with Thai characters. I've been sent a win7 laptop with thai language pack installed (in the task bar you can toggle between EN and TH to switch between THai and ENglish input). Many things work. In some...
I am creating a BINARY string stream that can do both input and output. I want to create a function that would give me the current size in bytes anytime I do an input or/and output when you do a read() or a write().
I have created this small...
I have a function
I already have the assert to make sure we have the correct size. still coverity detects that memcpy can fail
CID 10075: Out-of-bounds access (OVERRUN_STATIC)
Overrunning static array "buffer" of size 16384 bytes by...
If i compile my code with gcc under Ubuntu i get no warning and everything works good.
If i compile the same code with g++, i get this warning:
warning: pointer of type ‘void *’ used in arithmetic
This is the code:
However, the...
how do you determine the absolute file path to a file opened using ifstream when the file was opened using a relative file path & name?
for example:
ifstream ifInputFile;
ifInputFile.open("file.ext
How do I retrieve...
The attached code uses an array to take a word or group of letters and output the corresponding ICAO code but I need to add code so that if non-alphabetic characters are entered it will result in an out-of-bounds access. Would appreciate any help
Hi,
I am experimenting with AppInit_dll. I tried API hooking using this code sample: http://www.codeproject.com
It is supposed to hide calc.exe from Task Manager. However it does not seem...
Hi Experts,
I am trying to understand how to analyze a double free error. I have the following simple code. When it crashed, I collected the core dump.
When I loaded the core dump into GDB, I have the followings. I am wondering why...
Hi,
I have a general question about freeing up the memory on objects in C++. Suppose I have the following:
class B
{
public:
int num;
};
class A
{
public:
int num;
B* mpBptr;
};
int main()
{
A*...
I am trying to figure out the best way for users to "register" the program I am writing.
Here are my simple guidelines:
1. The program should be able to be registered without an internet connection.
2. The registration dialog box...
OK,a dumb and simple question - I'm recompiling my ap in VS2008 (from 6.0). Every file gives the warning:
WINVER not defined. Defaulting to 0x0600 (Windows Vista)
What is my best strategy? Where to set WINVER, what to set it to.....
...
I have an application written in C++ using Visual C++ 2009. In this application I have a seperate 'watcher' thread that listens for messages targeted for this seperate thread. In my application I have a header file that let's call common.h. In...
I have inherited a C++ application with source code. I am familiar with C#, but not C++. I need to make a change to this application. When I look at the source code, it consists of several .h files, several .c files, 2 .LIB files and a .def file....
Im trying to transfer a 32-bit C++ ActiveX control (developed using Visual Studio 2003 on a Windows XP machine) to 64-bit Windows 7 using Visual Studio 2008.
Ive set the output for the both the solution and the single project it contains to...
I have a string that holds the COMPUTER NAME.
It is defined as:
How would I loop through each character?
I have tried this, with no luck:
Can anyone tell me how to get this working?
Thanks!
Hello,
I am trying to run the code from http://numericalcomputing.
However, I cannot compile it in Visual studio express C++.
I am getting the following errors:
1>------ Build started:...
Hi,
I have a MFC dialog based C++ application that I would like to deploy as a demo. software and what I am looking to do is the following:
Upon startup of my app, I would like to check the current date and verify that against a...
Using c++, does anyone have a sample snippet that would help me in finding the first folder name , alphabetically, in root dir c: ?
Thanks!
jkr
261,219
Guru
1,000 points yesterday
Profilesarabande
121,084
Master
3,800 points yesterday
ProfileInfinity08
54,855
Master
0 points yesterday
Profileambience
50,164
Master
0 points yesterday
ProfileZoppo
48,382
0 points yesterday
Profileevilrix
48,358
80 points yesterday
Profilesatsumo
22,400
0 points yesterday
Profiletampnic
19,040
0 points yesterday
Profilephoffric
16,596
0 points yesterday
ProfileDanRollins
16,330
0 points yesterday
Profileduncan_roe
14,400
0 points yesterday
Profilegtokas
12,700
0 points yesterday
ProfileAndyAinscow
12,132
0 points yesterday
Profilemccarl
9,600
0 points yesterday
ProfileTommySzalapski
8,800
0 points yesterday
Profilepepr
7,824
0 points yesterday
Profilekaufmed
7,168
0 points yesterday
ProfileThommy
6,700
0 points yesterday
Profileubound
6,550
0 points yesterday
Profilekuroji
6,000
0 points yesterday
Profilefor_yan
6,000
0 points yesterday
Profilemrwad99
4,600
0 points yesterday
Profilemasheik
4,572
0 points yesterday
ProfileOrcbighter
4,332
0 points yesterday
Profileozo
4,300
0 points yesterday
Profile