49,766 Topics

Member Avatar for
Member Avatar for Elixir42

I have a function to detect if the mouse is over a mesh but what if I had a hard coded square. I am using D3DXIntersectTri() and pluggin my vertices into it. but they (obviously) dont update when I move the square. My question is how do you get the …

0
64
Member Avatar for Elixir42

I have searched on the internet for a 'working' double to char* does anyone have any idea? I need to pass the string to a function that takes a char* as an argument.

Member Avatar for Elixir42
0
3K
Member Avatar for kikechithomas

HI, I AM THOMAS. I AM IN A COMPUTER PROGRAMMING CLASS AND HAVE BEEN GIVEN AN ASSIGNMENT. I HAVE TRIED TO FIGURE IT OUT FOR A WEEK WITH NO SUCCESS, READ DIFFERENT BOOKS AND VISITED VARIOUS WEBSITES IN VAIN.I HOPE I LANDED THE RIGHT PLATFORM TO HELP ME OUT. THE …

Member Avatar for Lucaci Andrew
0
145
Member Avatar for steveaustin

how i do this problem, i dont understand this problem plz everyone can help me Write a grading program for a class with the following grading policies: a. There are two quizzes, each graded on the basis of 10 points. b. There is one midterm exam and one final exam, …

Member Avatar for dagurr
0
706
Member Avatar for MasterHacker110

I am trying to make a program that will check the remaining number of an item left in stock and that will, if someone buys it, subtract the amount of the item bought and then re-write it into the database... (Something like what they use in some stores) How do …

Member Avatar for Lucaci Andrew
0
414
Member Avatar for kshahnazari

Can someone help me with a funtion that find a string in another one ? the example is string a= "hello how arsdddf" , b = arsdd ; I want a funtion that if b exists in a gives me the number that begins with it like it must give …

Member Avatar for L7Sqr
0
80
Member Avatar for ranam

I want to know how exactly to add the button at the top of the search to note as the search criteria is for example asc to desc or vise versa ![kk[](/attachments/large/1/kk[.JPG "kk[") that is here i need a icon beside the colors to show me when i search weather …

Member Avatar for ranam
0
160
Member Avatar for acerious

This is what i have so far guys, //LAB 6 #include <iostream> #include <cmath> using namespace std; double getSides () { double sideA, sideB, sideC; cout << "Enter three sides: " << endl; cin >> sideA >> sideB >> sideC; } bool formTriTest (double sideA, double sideB, double sideC) { …

Member Avatar for NathanOliver
0
209
Member Avatar for m20072

Hello, i have got no expereince at all with c++.. im just adding something to the source of my private server and i failed to do so because of the fact that it wasn't a tutorial on how to add it (just a release) so here is the error: error …

Member Avatar for m20072
0
671
Member Avatar for ymdeek

I need a way to return the maximum value of five numbers This is the explanation •function -- identify the maximum value of the five integers â—¦function name: maxValue â—¦function parameters: five integers, pass-by-value â—¦function return: the maximum value of the five integers, as an integer This is what I …

Member Avatar for nndung179
0
228
Member Avatar for prahesh

Example: #include<iostream> using namespace std; enum e_UserName { planet1, planet2, planet3, planet4, planet5, planet6, planet7 }; enum e_ServerName1 { Venus = 11, Mars, earth }; enum e_ServerName2 { jupiter = 11, pluto, neptune, earth2 }; struct map { enum e_UserName eUserName; enum e_ServerName eServerName; }; struct map name[] = { …

Member Avatar for prahesh
0
189
Member Avatar for darkrandomness

I'm new at this. But I'm taking a class and I need to turn this in by Friday. Please help me. I can only use strings and arrays. My hangman program needs five things: 1. user is prompted for a word that is ten letters or less, or else the …

Member Avatar for darkrandomness
0
252
Member Avatar for pepsi123

I keep receiving these error messages: Applicant.cpp:25:6: error: prototype for âvoid Applicant::setDeposit(char)â does not match any in class âApplicantâ Applicant.h:12:7: error: candidate is: void Applicant::setDeposit(bool) Applicant.cpp:29:6: error: prototype for âchar Applicant::getDeposit()â does not match any in class âApplicantâ Applicant.h:13:7: error: candidate is: bool Applicant::getDeposit() Applicant.cpp:71:5: error: prototype for âint Applicant::addPoints(int)â …

Member Avatar for pepsi123
0
172
Member Avatar for gthaliath

Hi I would like to get some directions on where to look for in the way of getting a c++ profram to put hex values on a printer. I would also like to know if some one could guide me with a few examples. Regards GT

Member Avatar for Ancient Dragon
0
34
Member Avatar for pkfx

Hey, I've completed an assignment in visual studio and it gave me expected results for example 261. My university system uses g++ so i compiled the assignment with it and it gave me 262 and there the exact same files. If anyone has any suggestion and experiances like this please …

Member Avatar for JasonHippy
0
111
Member Avatar for mLearning

Hi, I am using RC4 to encrypt the data. It works fine. But I found that some encrypted values contains NULL character or other escape characters in result. Due to which when I read the string back to decrypt, does not give the whole string back but truncate the string. …

Member Avatar for mLearning
0
247
Member Avatar for pjh-10

#include <iostream> #include <new> using namespace std; int main () { int i,n; int * p; cout << "How many numbers would you like to type? "; cin >> i; p= new (nothrow) int[i]; if (p == 0) cout << "Error: memory could not be allocated"; else { for (n=0; …

Member Avatar for Lucaci Andrew
0
161
Member Avatar for Mncedisi

You are asked to write a program that manages a company's stock. To manage the stock the program need to keep track of item information, prices and quantities. A user should be able to adjust these values on selected items, draw reports and perform certain functions over all the data. …

Member Avatar for Iyfjeyeon
0
182
Member Avatar for iamcreasy

Hi, I used to solve ACM problems, but I used old scanf & printf for input and output.But now i want to use C++ style IO. So, i picked a simple problem, and tried to convert its old style IO to new style IO. The problem : [URL="http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=996"]http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=996[/URL] (in summery, …

Member Avatar for iamcreasy
0
268
Member Avatar for asha12@gmail

what are arrays in c++ programming how to do or what is meant by swaping?

Member Avatar for Agni
0
94
Member Avatar for Niketh

hi all, I am working on C++ coding of fault simulation algorithm of a digital circuit . The first step involves parsing of netlist files. The sample netlist looks like - # Only 2,3 input gates considered ... INPUT(1) INPUT(2) INPUT(3) INPUT(6) INPUT(7) OUTPUT(22) OUTPUT(23) # comment here 10 = …

Member Avatar for hactor
0
569
Member Avatar for owenransen

I'm flumoxed, how do people normally handle CBaseClass::operator== and CDerivedClass::operator== What I have done is illustrated below, but is it good valid C++? I compare the base class members first (using base class ==) and then the derived class members (the rest of the implementation of the derived class ==). …

Member Avatar for rubberman
0
125
Member Avatar for maniee

PREHIT/0.05 RETRACT/0.05 $$ NO,>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ,SEARCH FOR A SURFACE ASSIGN/V4=0 ASSIGN/V2=.32 ASSIGN/XOLD=0 ASSIGN/V1=0.01 ASSIGN/V3=0.001 SRCH01 =LABEL/ PNT7B1 =FEAT/POINT,CARTESIAN THEO/<2.739,3.395,V2>,<1,0,0> ACTL/<2.7395,3.399,0.2218>,<1,0,0> MEAS/POINT,1 HIT/BASIC,NORMAL,<2.739,3.395,V2>,<1,0,0>,<2.7395,3.399,0.2218>,USE THEO=YES ENDMEAS/ ASSIGN/V4=V4+1 IF/XOLD < PNT7B1.X ASSIGN/XOLD=PNT7B1.X ASSIGN/V5= PNT7B1.Z END_IF/ IF/XOLD < PNT7B1.X + V3 ASSIGN/V2=V2 - V1 GOTO/SRCH01 END_IF/ ASSIGN/V2=V5 + V1 ASSIGN/XOLD=XOLD-.001 IF/V1 == .01 ASSIGN/V1=0.003 ASSIGN/V3=0.00015 …

Member Avatar for maniee
0
191
Member Avatar for marin.kvasina

I've been tryin to make a keylogger to see how C++ handles keystrokes and sends them. I've found some code online and modified it a bit but, this has limitations and isn't accurate enough (+ missing characters from non english keyboards). #include "stdafx.h" #include <iostream> #include <windows.h> #include <winuser.h> using …

Member Avatar for BobS0327
0
239
Member Avatar for triumphost

I'm trying to flip an image which has its pixels stored in a vector. For some reason, when I try to flip it, the image gets distorted and gray/fuzzy. Any idea why? My code is as follows: void JNIData::FlipBytes(void*& Result, bool TopDown) { unsigned char* Pixels = &BufferPixels[0]; //vector of …

Member Avatar for mike_2000_17
0
225
Member Avatar for dsotelo91

Hi there. I am trying to code a program to add or subtract two polynomials using linked lists. For ex. (+4x^2-2x^1) + (+2x^12-5x^5). So far I have a read function which takes in a string and uses substrings to take the coefficient and exponents and insert it to a node. …

Member Avatar for dsotelo91
0
4K
Member Avatar for testie

Im having some trouble putting together a linked list implementation of a queue. I'm getting a segmentation fault, which I believe is due to my empty() function because in an attempt to fix my empty() function, I made it determine empty based on (current_size == 0) instead of (front_p == …

Member Avatar for dx9_programmer
0
760
Member Avatar for blackcathatesMICE

Please help me. I really need a source code of a game that works on dev c++ except for the games: snake, sudoku, crossword, tic tac toe and hangman. almost everything i got from sarching the net had errors.. it's a rush school work. please help me. thank you.

Member Avatar for deceptikon
-3
147
Member Avatar for rizwan.ali.1656

HI I would like to modify the following function so that it could take any of the operators such as +,-,* or /. I want to know if its possible to do this without having to write bunch of ifs and else to define each of the operators separatly like …

Member Avatar for ravenous
0
353
Member Avatar for heather.fletcher.2012

Here is my code... #include <iostream> #include <cstring> using namespace std; class employee{ public: char name[64]; long employee_id; float salary; void show_employee(void); }; }; { cout<<"Name:"<<name<<endl; cout<<"ID:"<<employee_id<<endl; cout<<"Salary:"<<salary<<endl; }; }; int main(void); { char str1[40]="employee worker"; char str2[40]="employee name"; char str3[40]="employee boss"; char atr4[40]="employee name"; strcpy (worker.name, "John Doe"); worker.employee_id …

Member Avatar for JasonHippy
0
137

The End.