51,593 Topics

Member Avatar for
Member Avatar for docdoc

The following bit of code is from the Atmel AtUsbHid example. Can someone please explain the line DYNCALL(writeData)((UCHAR *)"12") which i believe is part of a DLL, maybe.... I know the code turns on and off a LED but i want to know how the code works.... [code] void CUsbHidDemoCodeDlg::OnLed2() …

Member Avatar for Ancient Dragon
0
108
Member Avatar for harshalone

hai friends this is new one on dani i would like to ask u question about how to create a webserver (console based) on vc++ i have searched a lot on google and many more sites but i am not able to find out exactly what i want waiting 4 …

Member Avatar for jaepi
0
132
Member Avatar for FireSBurnsmuP

Alright, I'm developing a program that is going to take in .pbm image files, manipulate them, and output them in .ppm (P3) format. That's all fine and good; I've got that down. However, I'm looking for suggestions on good and efficient ways to figure out if 2 points ( row …

Member Avatar for Duoas
0
195
Member Avatar for paradox814

what does it mean when you say z=1? Does it ignore what value you pass into the function? What is this called?

Member Avatar for Duoas
0
333
Member Avatar for jaepi

hello there, uhhmmm...anyone here could give me an idea or point me a reference on how web server application are created (console based) using c++...i'd be using threading, processes, synchronization and http protocol... a reference to any website or books would be nice...thank you...

Member Avatar for harshalone
0
153
Member Avatar for dasani

I am trying to make this program work but only getting halfway, i am supposed to have an output like this: Enter a string at least 8 chrs long: short The string is too short. Enter a string at least 8 chrs long: 1234567 The string is too short. Enter …

Member Avatar for dasani
0
129
Member Avatar for eranga262154

On my MFC application I read file and do some process on it. Here is the code I used to open and read only. [CODE=cplusplus] CFile srf_ReadFile; char * srf_FilePath = "ReadFile_001.txt"; if(srf_ReadFile.Open(srf_FilePath, CFile::modeRead)) { // Do the required process here on ReadFile_001.txt }[/CODE] So, the file should be always …

Member Avatar for eranga262154
0
138
Member Avatar for cjwenigma

Hello Everyone, I'm trying to write a simple and funny fighting game. I want to write the first class of the game called teacher and i'm not sure if i'm going about it right. I have the moves Punch, Kick, Deafening Whistle, and Textbook Takedown..haha.. don't ask! I also have …

0
57
Member Avatar for jacknight

I have finished writing my Dynamic, Linked-List implementation of the ADT List, but I can't figure out what the book includes the "void retrieve" function for. Insertion, deletion, the constructors, deconstructors, etc. all have clear purposes, but what is the purpose of the retrieval operation? The header file (class declaration) …

Member Avatar for Narue
0
150
Member Avatar for gator6688

Everything is working on this program except for the output to the table at the end. It will only display the second student I enter but not the first. [CODE]#include "stdafx.h" #include <iostream> #include <fstream> #include <string> #include <cstdlib> #include <iomanip> #include <cmath> #include <vector> #include <algorithm> using namespace std; …

Member Avatar for Narue
0
102
Member Avatar for drakkher

I need to make a code that opens a file that contains random numbers and then calculate and display the number of numbers, the sum, and average. I have it so that it will open the file and check for errors and close it. I am also able to get …

Member Avatar for stacyfrench
0
135
Member Avatar for sirkraven

[COLOR=green]Hi[/COLOR] [COLOR=green]I have a C typedef struct that I need to change to a C++ class.[/COLOR] [code] [COLOR=green]typedefstruct structTag3DScene[/COLOR] [COLOR=green]{[/COLOR] [COLOR=green]p3DObjectGroup pObjGroupArray; /* array of grouped scene objects */[/COLOR] [COLOR=green]int numObjGroups; /* count of grouped scene objects */[/COLOR] [COLOR=green]}[/COLOR] [COLOR=green]f3DScene, /* 3D Scene */[/COLOR] [COLOR=green]* p3DScene; /* pointer to 3D …

Member Avatar for twomers
0
102
Member Avatar for dblbac

suppose that x is an int variable, y is a double variable and ch is a char variable and the input is 15A 73.2 choose the values after the following statement executes: cin >> x >> ch >> y; a. x=15, ch='A', y=73.2 b. x=15, ch='A', y=73.0 c. x=15, ch='a', …

Member Avatar for dblbac
0
162
Member Avatar for dblbac

if alpha and beta were int variables, the statement alpha = --beta is equivelent to what statement? also what would alpha = beta++ be equivilent to what statement. i know you add 1 to the first one but it doesn't seem right. any help would be appreciated.

Member Avatar for dblbac
0
88
Member Avatar for tones1986

Okay folks. I am writing a c++ program that will take a text file filled with test scores. Test1, Test2 and FinalTest. There are 32 test scores to be processed. I finished this first assignment using pass by reference using things such as: Prototype: [code] void doStatsRef(int [], int, double&, …

Member Avatar for Narue
0
137
Member Avatar for gee1288

hey guys i need some help with this input file program im getting input file invalid all the time i have no idea what to do. im supposed to create data files with data for up to 10 students and calculate their average from five perecentages i think i got …

Member Avatar for Ancient Dragon
0
117
Member Avatar for cowboy4mhell

[QUOTE=Dave Sinkula;240584](1) Run the program. Use a value bigger than 10 in the main loop. (2) Surely you can make an attempt at these changes. Please enclose posted code in code tags -- just like it says in the little box you reply in.[/QUOTE] I used a double for my …

Member Avatar for Salem
0
78
Member Avatar for spankyg

This may seem like an odd question, I'm not sure? I have been programming exclusivley using Dev C, and I now have to complete a project using Visual C++ 2005. I am trying to figure out just exactly how to properly use "handles". Maybe I'm barking up the wrong tree? …

Member Avatar for Narue
0
129
Member Avatar for k7_keshav

please can anyone help me with a c++ project that includes classes,datafile,functions, and some minimal graphics for my class XII project. thank you

Member Avatar for k7_keshav
0
96
Member Avatar for weasel7711

Trying to write code to concatenate two arrays of pointers to chars (char* example[]) The program should randomly generate a sentence using 4 arrays of prepositions, nouns, adjectives, and verbs. I found a concat algorithm somewhere on the net and modified it to fit my needs but whenever i execute …

Member Avatar for Narue
0
193
Member Avatar for curt22

Hi everyone. I'm having trouble getting groups working in a list box.I'm trying to have two groups. One will be "Done", and the other will be "todo". I'm getting these errors: [QUOTE] In function `LRESULT WindowProcedure(HWND__*, UINT, WPARAM, LPARAM)': `ListView_EnableGroupView' undeclared (first use this function) (Each undeclared identifier is reported …

Member Avatar for knopper
0
572
Member Avatar for mannantes

HI, plz can you help me i have a text file like this : [CODE] [LIST=1] [*]telemetre_18_04_2007_11h_08_mn_50sec.dbt [*]1176887334023317 1 D 3 1.486789 124 -17.150263 [*]1176887334050289 1 D 3 1.506669 125 -16.790839 [*]1176887334077692 1 D 3 1.521077 126 -16.517200 [*]1176887334103341 2 D 3 1.579571 127 -15.251071 [*]1176887334130332 2 D 3 1.557395 …

Member Avatar for mannantes
0
4K
Member Avatar for nshh

I am using borland c++ builder 6.0 can you tell me how to solve this error? [Linker Error] Unresolved external 'hasp_login' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\PROJECTS\DONGLE C TESTING VERSION2\UNIT1.OBJ

Member Avatar for tarekkkkk
0
205
Member Avatar for notathing

My brain must ave rolled back too. Can someone point out why this is giving me an error (actually a windows error) when i run it, though it compiles with no errors in MV c++? [code=c++]#include <iostream> using namespace std; int returns300() { return 300; } void main() { int …

Member Avatar for Salem
0
74
Member Avatar for jamesny89

I am doin a project for class that involves c++ programming. I am having trouble gettin it started though i posted the link below to the problem. Can anyone give suggestions to how i should approach this? THanks alot in advance [url]http://cis.poly.edu/cs1114/homeworks/hw03/hw03.html[/url]

Member Avatar for Salem
0
160
Member Avatar for joshmo

i have a problem calculating the cost with this code. the code is supposed to use the different call rates to calculte but it only uses the first rate. it is supposed to get the total cost of around 4 calls with different rates..sorry if it is too long but …

Member Avatar for Salem
0
116
Member Avatar for WINPUSLIKR

I know how to right c++ code to determine in an (int) is odd or even. How would I add a boolean function to do the same thing. I have to input an number then determine if it's odd or even. I have to add 3 numbers one at a …

Member Avatar for Ancient Dragon
0
57
Member Avatar for SurviBee

Doing Project Euler problem 3. Don't know why code not working. [code] #include<iostream> using namespace std; //largest prime factor 317584931803. bool Primechecker(int); int main() { int greatestprime=1; int limit = 317584931803; int runningcount=1; while(runningcount<limit/2) { if (Primechecker(runningcount)==true && limit%runningcount == 0) { greatestprime = runningcount; } runningcount++; } cout << …

Member Avatar for Duoas
0
78
Member Avatar for go939

hey there! i would like to ask help on how to use the dlsym() in making a dll test program. can somebody gave me a sort of reference for me to study? THANKS

Member Avatar for Duoas
0
138
Member Avatar for balla4eva33

I'm trying to create some classes that work together via Operator Overloading. I have the main.cpp and the Distance.h files exactly how I want them, and now I just need help properly setting up my Distance.cpp file to link properly and run accurately with them. Here's a look at what …

Member Avatar for balla4eva33
0
102
Member Avatar for RohitSahni

Hi All, I am calling one exe from my c++ code exe, now i want some(two or three) values in my c++ code exe from that exe which i am calling, Any idea how can it be done? Plz help me out in this.

Member Avatar for n.aggel
0
86
Member Avatar for Back door daddy

I need to prompt the user for a txt file and display what the text in it. Our example is January Fishing line 132 spools 24 spools Fish hooks 97 packages 45 packages Sinkers 123 packages 37 packages Fish nets 12 ea. 5 ea. Tackle box 75 ea. 15 ea. …

Member Avatar for Narue
0
61
Member Avatar for mrb260478

Can some one help me to : How to Read integers stored in a text file in the following format : 26 52 23 41 19 61 54 4 19 95 84 25 55 22 (integers delimted by a space.) to be used for sorting later. Have tried following code: …

Member Avatar for Narue
0
149
Member Avatar for niki01

Some computers do not provide a privileged mode of operation in Hardware, is it possible to construct a secure O/S for these computers? Why and Why not? Please I need a feedback. I know it is possible to construct a secure O/S because the operating sys. can create a security …

Member Avatar for niki01
0
127
Member Avatar for need_Direction

Hi there, I have a problem in breaking a sentence into each string. i have tried to use find() to search for the " "(space), use substr to search from the first string index into the find space number. It works for the first string. But I am unable to …

Member Avatar for need_Direction
0
120
Member Avatar for rugae

I've know that a pointer to some dynamic memory must be deleted to prevent memory leaks. Now if say a struct/array or some other data structure, each with its own dynamic memory parts. If that structure (class, file...etc) contains the data structure goes out of scope does that automatically free …

Member Avatar for Narue
0
127
Member Avatar for RohitSahni

I am calling one c++ exe from my unix shell script, i am trying to set the env variables using putenv() thru my c++ code. Now i want to use these varibles in my new exe which is there in the same shell script(set by using the previous exe ) …

Member Avatar for Ancient Dragon
0
129
Member Avatar for addicted

Hey, I just want to start using mfc to create windows objects, i have never tried coding using the mfc and opening the tutorial page on microsoft's msdn is the slowest thing that can happen around here. so i will like someone to quickly give me a hint on how …

Member Avatar for Ancient Dragon
0
104
Member Avatar for eranga262154

Hi all, The topic is my question. I’ll explain it more. Just look at the following C++ code segment, [CODE=cplusplus] if(number_1 == number_2); { std::cout << number_1 << " == " << number_2 << std::endl; } [/CODE] Note that, I have put a semicolon just after the right parentheses. It’s …

Member Avatar for eranga262154
0
1K
Member Avatar for joshmo

hey..would anyone help me with my code. the program is supposed to get telephone starting and ending times from a file from the user then outputs the total duration and calculates the cost. my program does all this but it is giving me a problem in finding the total cost …

Member Avatar for joshmo
0
81
Member Avatar for Duki

Hey everyone, I'm still tweaking the attributes but here is what I've got: [B]All races:[/B] dmg = rand, where 0 < r < str [B]Human[/B] 25% chance of blocking 5% chance of double attack (attack x2) 10% chance of dmg+60 [B]Elf[/B] 5% chance of blocking 35% chance of double attack …

Member Avatar for Mouche
0
180
Member Avatar for eranga262154

Hi all, I want to use a dynamic buffer in one of my application. I'll explain it in this way. Depend on one of my calculation I found a number(int value), and I want to define a buffer size to that value. Then after doing all the required process need …

Member Avatar for eranga262154
0
87
Member Avatar for mrmonkee

I have an exercise like this: Design a simple text editor in console mode, not window form max character in a line is 80 user can move cursor up, down, to left and right, insert, delete character I don't know how to build it :( i should use linked list …

Member Avatar for jbennet
0
2K
Member Avatar for nicz888
Member Avatar for rajgopal.uoh

Can anyone help me in developing a code to draw triangles with given the lengths of the three sides.

Member Avatar for WaltP
0
39
Member Avatar for eranga262154

Hi all, I want to find the end of file in a CFile. What I've do up to now is, find the length of the file in bytes. Then do the required process with the number of bytes. Here is the code, [CODE=C++] int length = 0 ; CString str …

Member Avatar for eranga262154
0
564
Member Avatar for clski1973

I have trouble approaching my program assignments. First I write out an algorithm. and work out each part if the program. Then I get nervous. and overwhelmed. with the errors in compliling and such. I have been working on the current assignment several days. And am frustrated and 2nd guessing …

Member Avatar for Duoas
0
308
Member Avatar for coolbreeze

I am just preparing to take a quiz and he said some examples will be kind of like this and I was just tryin to get some input on if these answers I have are the right ones.. he said just do what the statement says, no further work, just …

Member Avatar for WaltP
0
90
Member Avatar for chanah

I don't know if this is the place to ask:confused: , but anyhow: My problem is this: I need to find the absolute minimum and maximum of a function of two variables, in a given bounded area. There are several numerical methods for finding local extrimum of functions, but none …

Member Avatar for Salem
0
89
Member Avatar for jacknight

I searched the forums but I didn't find any useful information. I am just trying to write a simple recursive solution to do F(n). It seems simple to me but I am probably not thinking about it correctly. My program has no errors, but it only returns 55 and then …

Member Avatar for jacknight
0
85

The End.