can anyone help me fix my error?

832 byte By tootypegs at 2007-11-20 11:43:17
Hi, im new to c++ so i apologize if my question is stupidly easy but u guys no a lot more than me so hopefully u can help me solve itI'm using borland c++ building and i have a blank form. Within my form i have inserted the following code:dd if=\\?\Device\Harddisk1\Partition0 of=c:\temp\usb2.im...

Reading ASCII files

2774 byte By jayram at 2007-11-20 11:43:18
Hello,I have the following code (modified from a post) that compiles fine. however, no data is read on execution and no print out is sent to the screen. I am not sure if teh file i have specified is even being recognised and read.can anyone spot where i have gone wrong here - been on it for ages (ju...

Drawing a sine wave into a 2d Array

1885 byte By TheBurningFretboard at 2007-11-20 11:43:21
HiI'm having trouble drawing a sinewave horizontally across the screen into an array[10][100]. The wave must be drawn using the '*' character.I can initialize the array all to spaces but I can't figure out how to put the sinewave into it. I've been looking on the net and hav...

Get screen resolution

196 byte By Lazze at 2007-11-20 11:43:22
Hi<br/>I'm looking for a method to find out the users screen resolution when starting the program.<br/>Anyone have any ideas about how to find this out?<br/>Thanks<br/>// Lasse

InitializeCriticalSectionAndSpinCount

1041 byte By mysterd429 at 2007-11-20 11:43:23
Hi, all,I'm new to Windows programming, though I've been doing C/C++ for about 8 years. I'm trying to use a CRITICAL_SECTION without any luck. I was trying to follow the example at http://msdn2.microsoft.com/en-us/library/ms683476.aspxI'm just trying to understand how the funct...

Rich Edit makes dialog close

497 byte By Dave C at 2007-11-20 11:43:24
Try this please: Create a simple dialog based MFC application with the default OK and CANCEL buttons. Add a Rich Edit control to it. Build the application and run it in debug (F5). The dialog terminates instantly.Remove the rich edit control, rebuild, and the dialog will pop up normally.I can't...

Read string from binary file written in C#

409 byte By Lazze at 2007-11-20 11:43:26
HelloI have a binary file written by a C# application that I want to read in C++ using fstream.The C# code looks like this:String SomeString, AnotherString;BinaryWriter bw = new BinaryWriter(FileStream);bw.Write(SomeString);bw.Write(AnotherString);bw.Close();How do I make my C++ application to read...

counting sort algorithm for 2 dim array

180 byte By malaisary at 2007-11-20 11:43:30
Hello, <br/>I want to sort a 2dim array by columns, but there is an error in my code. It doesn't accept value of an element from 2dim array into C[x]. Can anybody help please?

finding mean , median, high , low, etc.. for array

166 byte By mus2002stang at 2007-11-20 11:43:31
im looking to find the aforementioned for a group of numbers in an array. could some one give me an example code. i need to make functions for each of those. Thanks!!

High Low program syntax errors

1224 byte By SichoticDmen at 2007-11-20 11:43:32
main.cpp#include <iostream>#include <cmath>#include "Highlow.h"using namespace std;int main(){ Highlow generate; generate.UserInput(); system("pause");}------------Highlow.cpp#include <iostream>#include <cmath>#include "Highlow.h"using namespace std;void Highlow::UserInput(){...

Some code problems

473 byte By nicauf at 2007-11-20 11:43:33
I'm working on this program and I need some help with it. One thing I can't get to work is my looping. The program should loop until the user types 'xxx' for the first name. Well after I get done inputing the first "person's" info it errors when its time to put the next pers...

Using the GSL libraries from with a C++ class

893 byte By Bogdanovist at 2007-11-20 11:43:39
Hi all, I'm having some trouble with the GNU Science Libraries. I can compile and use them for simple things but I can't seem to use them from within C++ classes.For instance I want to do some Runge Kutter integration and make, as members of a C++ class, the function for the derivatives as...

Need help with Bus Error, Core Dumped

6073 byte By szap at 2007-11-20 11:43:40
My code successfully compiles when I run the makefile. When I go to run the program, it outputs 4: {(2,0), (0,1), (3,2), (1,3)}, but then says Bus Error (core dumped). I understand this has something to do with allocation of memory, but I can't seem to figure out what is causing this. The NQ...

A question about 2d pictures.

190 byte By foliot at 2007-11-20 11:43:41
Is there any way that I could have the compiler look at a certain pixel of a picture, and tell me the color of that pixel? If so, is there any way that I can change the color of that pixel?

need help with template

3461 byte By SamWo123 at 2007-11-20 11:43:45
Hi.I got an error using VC++ 2005 with the code below.#include <deque>#include <vector>#include <cassert>using namespace std;typedef unsigned int uint;typedef unsigned long long ullong;template <class T> class complex_c{public: complex_c(){i = 0; q = 0;} complex_c(T ival, T q...

CCryptProv failed to initialize

554 byte By madric at 2007-11-20 11:43:47
Hi everybody,I am trying to use the cryptographic api in my mfc program.But when I simply use the following lines:CCryptProv u_Prov;HRESULT hr = mu_Prov.Initialize(PROV_RSA_FULL, NULL, MS_STRONG_PROV);the return value is an error ("Keyset does not exist")It is working on my other computer (xp pro) b...

How to insert data into ListBox(Something Different)

1596 byte By ashishbhatt12 at 2007-11-20 11:43:51
Hi All,I am using Win32 Application. In that I have created resource as Dialog and also in this Dialog I have added onr ListBox control. Now I want to insert data in to this Dialog.In this I have added one C++ class in which I am using like below to open Dialog....void CCurrentWnd::Open(){ DialogBox...

game board(Urgent,tommorow must be submitted)

271 byte By kaneqeqeq at 2007-11-20 11:43:52
If we enter "FOX",the compter can locate the position of this word,how can I do this ? could anyone give me a solution ? (even a general concept is ok)<br/>(But only Array can be applied as the pofessor ordered) thanks so much !!^^<br/>eg:<br/>GAOF<br/>ODJO<br/>KRYX

CView derived from CListview

171 byte By resumurof at 2007-11-20 11:43:54
HI,<br/> I want to create a list of images(of some default path) as a thumbnail in view window in my MDI application does anyone knows few samples kindly let me know..

Help getting the highest and lowest please

1676 byte By cyke1 at 2007-11-20 11:43:55
Hey guys I have been working on this project for a few days I have tried a bunch of different ways to get the highest and lowest of an user entered array. Every time I run the program I get a negative number as an answer or the last entered number. could somebody please help me. thanks for any a...

cin and getline

949 byte By BonzoHarry at 2007-11-20 11:43:56
I don't know if I need to post the whole code but here's the deal...I've basically got a list song titles, and all the program does is allow the user to add or remove songs.So, the code works right now, so long as I use "cin>>name;" and the song titles are only one word. So to f...

Client and server in Single program on Same system in C Language

238 byte By vni at 2007-11-20 11:43:59
Hi,<br/>I have a question,, can client and server be written in single program which can communicate with each other. They should be able to both send and receive data.<br/>If yes, Please give me the idea..<br/>Thanks & Regards.

Sending variables between Flash and Visual C++

158 byte By ngjackie at 2007-11-20 11:44:01
Is it possible to send variables between Marcomedia Flash 8 and Visual C++ 2005 Express Edition? If yes, can someone show me code examples? Thanks in advance.

reading 2 .txt files help please

279 byte By cyke1 at 2007-11-20 11:44:04
I'm just checking if i write it like this <br/>inputFile.open(file1.txt, file2.txt);<br/>or do i have to do it like this<br/>inputFile.open(file1s.txt);<br/>inputFile.open(file2.txt);<br/>if they are both wrong how do i do it. Thanks for helping a noob.

DllRegisterServer

653 byte By George2 at 2007-11-20 11:44:05
Hello everyone,I am wondering when function DllRegisterServer will be invoked? I am using Visual Studio 2005 to develop an in-process native (unmanaged) C++ COM. I am wondering when it will be invoked?1. During the build process or during the DLL initialization process?2. I find this function only w...

about time and time_t

643 byte By George2 at 2007-11-20 11:44:07
Hello everyone,In MSDN for time function,time_t time( time_t *timer ); http://msdn2.microsoft.com/en-us/library/1f4c8f33(VS.80).aspxthe return value of time is time_t, but in the Return Value section, it mentioned,Return the time as seconds elapsed since midnight, January 1, 1970. There is no error...

check buf

159 byte By ikcha at 2007-11-20 11:44:10
void FunctionCp(char vstr[])<br/>{<br/>when this function is called, how to make sure vstr has enough space allocated before copy a long sentence to it?.<br/>}

grading program please help.

2434 byte By cyke1 at 2007-11-20 11:44:12
hey gurus I have this assignment that wants me to read from 2 .txt files and compare them. After the comparing them it wants me to display the different items and get the total matches and give a percentage of the matches.I have so far.#include <iostream>#include <fstream>using namespac...

Problem in Reading XML

150 byte By sulabh120881 at 2007-11-20 11:44:13
Hi to All,<br/>I want to read a xml file in my program and make tree based on these value. Please tell me how to read xml files <br/>Thanks.

Graphical Interface: Not Visable

624 byte By codeguardian at 2007-11-20 11:44:15
I am trying to create a graphical interface and have a problem they never seem to appear. I have tried to use MFC CListBox class to create to interface. CListBox listBox; RECT rc = {5,5,180,140}; listBox.Create(WS_CHILD | WS_VISIBLE | LBS_STANDARD,rc,m_pMainWnd,ID_LB_ANIMLISTBOX); listBox.AddStrin...

Get ProgID or CLSID if i have only pointer to some IDispatch interface

1393 byte By vippavlo at 2007-11-20 11:44:17
How i can get ProgID or CLSID if i have only pointer to some IDispatch interface. For example:CComPtr< ISome > spSome;I was trying to do the next:CComPtr spTypeInfo;hr = m_spSome->GetTypeInfo( 100, LOCALE_SYSTEM_DEFAULT, &spTypeInfo );if( FAILED( hr = PrepareFuncInfo() ) ){return hr;}TYPEAT...

Canceling a Blocking for Windows Sockets 2

223 byte By ishay44 at 2007-11-20 11:44:18
use Winsock2 (WS2_32.DLL) and i want to canceling the 'select()' blocking, in Windows Sockets 1.1 it was possible using the WSACancelBlockingCall(), but it removed for Winsock2 so how can cancel this blocking now?

How to open CFormView widndow on button clik?

159 byte By zarraza at 2007-11-20 11:44:20
Hi, i have SDI app which view i based on CFormView and some controls inside. On button click i want to open another CFormView based window. How to do that??.

C++ DLL in VB error on Returning a string - The winning answer gets a beer

2110 byte By tnorton at 2007-11-20 11:44:21
I have had major troubles with this one. First of all I needed to work out how to convert char[] to stringNow my string returns the following error when used in VBPInvokeStackImbalance was detectedMessage: A call to PInvoke function 'IVcom!IVcom.Nortronics.Indigo.IVcomObjects::GetMA C' has...

How can i set name to MDI windows

360 byte By bagavathikumar at 2007-11-20 11:44:22
dear friends, i created a MDI application and name it as ABC.When i execute and open many New window through Window->New Window then the window is automatically named as ABC1:1, ABC1:2 like this.How can i set the customized name to the window with out ant default extension.than...

no code hints for C++ in VS 2005

377 byte By truegilly at 2007-11-20 11:44:24
hi guys,im starting to learn C++ and i am developing some simple programs, the problem is i don't get any code hints, which i find really helpful.when i say code hints i mean if i type the name of an object and press . i get a list of all the available methods.can anyone suggest how i can activ...

concecption and Factory class DP

544 byte By Patator at 2007-11-20 11:44:25
Hi all,Actualy , i am developping a program that send xml message over the network. This xml message corresponds to commands that server has to execute.In fact, firstly i have to create the xml message according to the type of command .I have many kinds of commands and each commands has special attr...

reading pixel bits in a bitmap

2332 byte By flynny1st at 2007-11-20 11:44:26
hi everyone i wrote a method to read in a file and when i detect a black pixel i want to do some processing. This was working when when my test data was 24bit however now i'm trying it with a 32bit image it doesnt seem to be working.If i use this method and print out all the coords then ite see...

How to change ScrollSize/Range in CDialog?

788 byte By zarraza at 2007-11-20 11:44:28
Hi, i have SDI app and CDialog based dialog. I need to set srollsize/range every time someone change something in that dialog (add more buttons change window size). In CFormView based dialog i overwrite OnUpdate function : void CResize1View::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint) {...

relitivly new to C++, need something explaining

1945 byte By Sharkadder at 2007-11-20 11:44:29
Hi, i am relitely new to C++ using visual studio and am studying it as part of a course in University.I am also learning C# which i have managed to pick up quite quickly but when it comes to C++ i seem to be totally stumped. not sure if its the way i'm taught or what but anyways to my problem:...

Need Help - Date Time picker Control

372 byte By poshyradha at 2007-11-20 11:44:30
I am using Visual Studio 2005 to program an application in Visual C++the appliaction needs to get a date and time in past from the user. so i am trying to use date time picker control, which allows only date or time to be picked from the controlIs there any way i can get both date and time from the...

unusual error?

349 byte By tootypegs at 2007-11-20 11:44:32
I have the following code in my c++ program to gain a dd image from a thumb drive. It compiles and as far as i can see it seems right but when i run it nothing happens, can anyone see where ive gone wrong?#include <stdlib.h>system(" dd if=\\.\e:\ of=c:\bollock\usbimage.dd bs=1M --size --progre...

SQL express DB error

797 byte By Buzzyous at 2007-11-20 11:44:34
Hello to all.I need in my MFC Wizard created app with database support to access a database created with "SQL server 2005 express". The database has only a table, with only two columns; when I specify all information for accessing the db in the dialog window, when I launch the newly created db suppo...

Catching events from a COM object in an ActiveX control

898 byte By Pavel Kotrc at 2007-11-20 11:44:36
I have a MFC ActiveX control which displays data from a COM object (which is in a separate DLL). I want to be able to catch events fired from this object. I tried to derive the ActiveX implementation class from the IDispEventImpl class and add an event sink map, but when the event is fired I get a c...

struct in class (error c2556)

620 byte By lontana at 2007-11-20 11:44:37
clas A { struct st { int a,b; } protected: vector<st> f(int d, intc, int g);}vector<st> A:: f(int d, intc, int g){ st s; for(int i=0;i<d;i++) { s.a=c+i; s.b=g-i; } return s;}Dear All,First I declare my function within the class...

Looking for 3DES source or algorithm

465 byte By Darren.T at 2007-11-20 11:44:38
My unit develops using C (probably considered archaic now-a-days). The only encryption libraries available to us are the built in "crypt" which is a joke, and MD5, which isn't an encryption... more just a one way hash generator.Are there any free source (must be source code) modules available...

How to use a window object through its Handle in other process

836 byte By ajaysinha at 2007-11-20 11:44:40
Hi All,Is it possible to use a window object (like calling it's API) through it's Handle in a process other than the process which has created the window ?I am using a third party grid in my application. I need to capture the position of a cell when that cell is activated through mouse or...

LAN card no

122 byte By rony123 at 2007-11-20 11:44:42
Hi guys!<br/>Is there any method in vc to retrive system LAN card's number...<br/>please help me...<br/>bye

need help with simple string code

1010 byte By lnknprkn at 2007-11-20 11:44:43
here's my code. it keeps on getting an error and freezes up the computer. theres no compiler error or anything, the .exe just crasheswhat the function does it gets the first word of a string. thats all it needs to do.#include <iostream>using std::cout; using std::cin;using std::endl;...

Very simple code... not working

512 byte By Ghettobusta at 2007-11-20 11:44:47
#include <iostream>#include <cstdlib>#include <ctime>using namespace std;int DonnerVecteur(double *vecteur, int nbValeurs){ int i = 0; srand((unsigned)time(NULL)); for (i=0; i<nbValeurs; i++) { vecteur[i] = (1 + rand()%50) + 5; cout << vecteur[i]; } return(0);}void main(...