49,757 Topics

Member Avatar for
Member Avatar for mduncan8

I have a compass that connects to my PC through RS232 @ 38400 BAUD. the compass outputs different "sentences" to send different kinds of data. Each sentence is a string that begins with a special header and ends with <CR><LF>. The string that I'm looking for is "$IIHDG,A,B,C,D,E*hh<CR><LF> where A, …

Member Avatar for mduncan8
0
157
Member Avatar for mazix2

Hi guys, I'm trying to implement Karatsuba multiplication in c++ using stl vectors. I have some problems with multiplication (addition and subtraction are ok, I've checked). I need to read data from the file, when the file looks like that: 3 // tells me how many pairs I have to …

Member Avatar for mazix2
0
1K
Member Avatar for tallygal

This program compiles and lets me select a letter from the menu, but then it just repeats the menu, it never outputs the statements that correspond with the letter chosen. Any ideas why? [CODE] #include <iostream> #include <iomanip> #include <fstream> #include <cstdlib> using namespace std; //Function Prototypes void accept (); …

Member Avatar for tallygal
0
268
Member Avatar for pumba

Hi all, I am tryin to differentate an equation and solve using C or C++. I need a start, n i m not getting much information from web even..I am curous hw MATLAB does that...i m positive that LAPACK has a no subroutine for differentiation. Appriciate your response Thank you

Member Avatar for Nick Evan
0
111
Member Avatar for lashatt2

I can inject dll in my compiled exe but dll loses his mind and I don't want it :( I use this commands IDR_DLL1 DLL "libmysql.dll" #include <tlhelp32.h> #define IDR_DLL1 128 HEAPLIST32 PE32; HINSTANCE hInst = (HINSTANCE) GetModuleHandle ( NULL); HDC hdc = GetDC(hwnd); HDC hdcMemRes = CreateCompatibleDC(hdc); HRSRC hRsrc …

0
62
Member Avatar for stricklypni

would the code below work for an hash table as in searching prior to inserting part... would it actually step through the table as in through the nodes then to whatever cells the nodes point to ... i have no other way of checking just yet .. coding still in …

0
44
Member Avatar for stricklypni

fatal error C1075: end of file found before the left brace '{' ANY IDEA WHAT MAY BE MY PROBLEM??

Member Avatar for stricklypni
0
105
Member Avatar for Pynolathgeen

My program keeps crashing when not in debugging mode. So now i'm debugging manually, or well, log everything to find where it is crashing [code=C++] Oldproc = (PROC)SetWindowLong(Childs[1], GWL_WNDPROC, (DWORD)EditProc); cout << "Oldproc\n"; SetFocus(MainWnd); cout << "SetFocus() Done\n"; cout << "DIRECTX:\n"; DirectX = new DIRECTX(); // Creating DirectX cout << …

Member Avatar for tetron
0
129
Member Avatar for heindrix_chenx

I’m writing a code on microsoft visual c++ 6.0 for load *bmp file and save it to *bmp file too. But i got stuck on save to *bmp code. Help me please.. void WarnaToRGB(long int warna,int *Red,int *Green,int *Blue) { *Red=warna&0x000000FF; *Green=(warna&0x0000FF00)>>8; *Blue=(warna&0x00FF0000)>>16; } long int RGBToWarna(int Red,int Green,int Blue) …

Member Avatar for Pynolathgeen
0
878
Member Avatar for tnecniv

Hi, is it possible to construct a pre order binary tree? i know how to do a pre order traversal. but constructing a binary tree using that i am not sure what it mean? what is the purpose of doing a pre order construction of binary treE?? please advise

Member Avatar for Mouche
0
80
Member Avatar for MrJNV

Hi, I have to do a recursive merge sort here. I got the merge sort done (thanks internet...because my book was useless), but I have to print the sublists as output. Here's the instructions: [COLOR="Green"]"The program must first display the list to be sorted. Then it must display the sublists …

Member Avatar for Mouche
0
233
Member Avatar for rkp728

I am writing a adler32 code to compute the adler32 checksum of a string. On the net I came across various sample codes: I did not understand some code entirely as <b>it has additional code</b> marked in bold below apart from the basic implementation of the adler32 logic. I did …

Member Avatar for rkp728
0
228
Member Avatar for jcps65

Hey Everyone, im struggling with this C++ assignment that my instructor assigned so i appreciate all the help that i can get. I have to read in the data from the text file and store it into parrallel arrays. My Text File looks like this: Darwin 103 04 20 2001 …

Member Avatar for WaltP
0
141
Member Avatar for LevyDee

[code] #include <windows.h> LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int iCmdShow) { WNDCLASS myWindow; myWindow.cbClsExtra = 0; myWindow.cbWndExtra = 0; myWindow.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH); myWindow.hCursor = LoadCursor(NULL, IDC_ARROW); myWindow.hIcon = NULL; myWindow.hInstance = hInstance; myWindow.lpfnWndProc = WndProc; myWindow.lpszClassName = …

Member Avatar for Ancient Dragon
0
84
Member Avatar for rizzi143

// hi guys actually i need some suggestion or help .. i want to add STRING capability in this following Queue program. currently it just eccepts the chars . so if somone can help me out in getting the String output. thanks [CODE]#include "stdafx.h" /***** Structure template *****/ struct list{ …

Member Avatar for Ancient Dragon
0
129
Member Avatar for guest7

Hi, I am trying to use the "partition" from STL algorithms. I get the following error: [CODE]error: no matching function for call to ‘partition(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, <unresolved overloaded function type>)’ /usr/include/c++/4.2.1/bits/stl_algo.h:2098: note: candidates are: _ForwardIterator std::partition(_ForwardIterator, _ForwardIterator, _Predicate) [with _ForwardIterator = __gnu_cxx::__normal_iterator<int*, std::vector<int, …

Member Avatar for Banfa
0
396
Member Avatar for Fenlevi

Hi people,in the assignment I was give the main function and was told to write a class, and the output is supposed to be like this: BLANK(0,0) Destination (6.2,16,7) BLANK (45,0) Destination (6.2,33.4) The x coordinate of source is:45 The y coordinate of source is :33.4 The label of point …

Member Avatar for jonsca
0
133
Member Avatar for rtllz

Im using xcode to write my program. Every time I build and run the program it will do everything fine, until the end. It keeps giving me an answer of 0 no matter what i put. Need help to figure out what im doing wrong thanks in advance. [CODE]//price_converter #include …

Member Avatar for rtllz
0
144
Member Avatar for Buttacup

I am a little unclear on what is happening here and if it's even necessary. [code] ICOMInterface** pICOMInterface = new ICOMInterface*[reserve]; for(SIZE_T i = 0; i < required; i++) pICOMInterface[i] = new ImplementingClass; for(SIZE_T i = (reserve-1); i >= required; i--) delete pICOMInterface[i]; [/code] I'm trying to get a set …

Member Avatar for Buttacup
0
132
Member Avatar for code zombie

[CODE]#include <iostream> template<class T1, class T2> class TwoThings { T1 thing1; T2 thing2; public: TwoThings(T1 t1, T2 t2) : thing1(t1), thing2(t2) {} template<class T3, class T4> friend std::ostream& operator<<(std::ostream& os, const TwoThings<T3, T4)&); }; template<class T1, class T2> std::ostream&::operator<<(std::ostream& os, const TwoThings<T1, T2>& tt) { std::cout<<tt.thing1<<' '<<tt.thing2; return os; } …

Member Avatar for mitrmkar
0
127
Member Avatar for pinsickle

Which would be considering a better coding style, this is for a merge sort in case you are wondering what I am doing with this line of code [CODE] int j = 0; // used to track for the temp array earlier in my code // reset it to be …

Member Avatar for Ancient Dragon
0
99
Member Avatar for confuse89

I am doing an C++ assignment on customizable scientific calculator. I wish to ask how to write a program that can automatically identify the variables when i load a formula? for example, when i input a formula: x + y the program will display: x? y?

Member Avatar for Buttacup
0
76
Member Avatar for YeMiller

Hi, I've had a quick look through this forum and can't really see anything to help. I've got a basic but fair knowldge of C++ but I'm unfortunately not very good at putting my knowledge into raw code :D. I'm currently doing an assignment to read data from one of …

Member Avatar for WaltP
0
142
Member Avatar for correaj

Good Day Folks! I'm having a difficult time getting this operator overloading function to work. I have try various syntax to get it to work. When I run the following code I get this compile error. [COLOR="Red"]g++ -Wall hmw6.cpp -o driver set.h: In instantiation of `correaj::set<int>': hmw6.cpp:9: instantiated from here …

Member Avatar for correaj
0
3K
Member Avatar for kira_

hello there. there's an error in my program that I cannot identify. Every time i call a function for my declared variable of type Stack, there will suddenly be a run time error. I really don't get what's wrong with my code because my implementation seems to be right but …

Member Avatar for mitrmkar
0
103
Member Avatar for NitaB

Hey guys! I must have some sort of logic problem that I'm just not seeing. I just want to read a file into a 2D array. The dimensions of the array are given by the very first line of the input file. Everything works hunky dorey except that when I …

Member Avatar for NitaB
0
108
Member Avatar for AltF4me

Hi everyone, I'm sure I'm doing something silly here! Basically my constructor creates a pointer initialised to null, then in one of my functions I create an integer array on the heap using the new keyword. Now basically I have a data structure that needs to be copied, like so …

Member Avatar for AltF4me
0
110
Member Avatar for ajsavoca

The assignment was to write a program that generated a random sequence of six non-repeating numbers between 1 and 53 until it matched a user inputted sequence (lotto). Here is the entire program. [CODE=c] #include <stdio.h> #include <stdlib.h> #include <math.h> #include <cctype> #include <iostream> #include <windows.h> #include <time.h> using namespace …

Member Avatar for ajsavoca
0
123
Member Avatar for B00t3r

Hi =) I'm a beginner with c + + so I have a small problem with Visual C + + When im typing } in vc + + it will not type } so I was wondering how do I fix this problem?

Member Avatar for strmstn
0
133
Member Avatar for mitch9654

I read somewhere else and found some code that had something like this in it: [CODE]char buf[] = {0};[/CODE] what does this do? thanks mitch9654

Member Avatar for mitch9654
0
61

The End.