51,592 Topics

Member Avatar for
Member Avatar for noraantonia

hello I implemented a rotating cube in opengl which rotates when the user moves the mouse. I am a beginner with opengl, so i wanted to ask you a question on rotating. here is my code for the rotation : [code] void CDiplomaView::OnLButtonDown(UINT nFlags, CPoint point) { // TODO: Add …

0
70
Member Avatar for spuddy1515

These is my code and i need to change it so that the second out put replaces the first and so on. [code]#include <iostream> #include <stdlib.h> using namespace std; int main() { int a = 0; int h; int m; int s; mistake: cout << "What is the current hour?\n"; …

Member Avatar for spuddy1515
0
118
Member Avatar for bis student

how can I check the donor if valid by using switch function Is_BloodBroup_Valid // takes a string as parameter and return true if it is a valid group and false if not. The only possible blood groups are A+, A-, B+, B-, 0+, 0-, AB+, AB-. also if I have …

Member Avatar for Luckychap
0
140
Member Avatar for sjcomp

Hello, I'm using Microsoft Visual Studio 8.1 (2005) to compile and link a library and my application that uses this library. Linking complains that a symbol can not be found. I looked at the lib file and this is what happens: [code] dumpReadable@OGRGeometry@@UBEXPAU_iobuf@@PBD@Z - Lib has this dumpReadable@OGRGeometry@@UAEXPAU_iobuf@@PBD@Z - My …

Member Avatar for sjcomp
0
111
Member Avatar for Adrian99420

Hi, I am using VS C++ 2005 express edition. I developed a simple GUI with a single tabControl (contain tabpages with some combobox). I wish to add a button which able to add another tabpage which contain the same item as previous tabpages. For example. my previous tabpage contain 2 …

Member Avatar for Narue
0
106
Member Avatar for Vic842

Well guys and gals, I am the beginner at this that is talked about when signing up in these forums. Looking for a good direction to get a grasp on C++. Always been very interested in programming and learning the different languages and would mind being fluent in the other …

Member Avatar for Vic842
0
172
Member Avatar for Lance_Wassing

Well I have a question which could stem some confusion. I'm using C++ to develop some software which i will release as freeware on my website. I'm not new to database programming, however i have only ever worked with xbase and dbase... I would like to start making software with …

Member Avatar for Lance_Wassing
0
122
Member Avatar for c_plus_plus_for
Member Avatar for Ancient Dragon
0
308
Member Avatar for lostandconfuzed

Hi folks! Was wondering if you could help with a problem. I'm supposed to write a function that writes n, n-1, n-2, …, 3, 2, 1. I'm pretty sure I've got it but for some reason I keep getting 0 whenever I run it. It doesn't have to be a …

Member Avatar for Agni
0
102
Member Avatar for rikkie

Hi guys, Could someone point me in the right direction, please? I'm trying to expand my system to accommodate the reservation of consecutive seat numbers. The user is prompted for a row number, seat number and then the amount of consecutive seats he would like to book. For example: The …

Member Avatar for rikkie
0
180
Member Avatar for tlly

Hi everyone.I've got a question on dynamic cast.Dynamic_cast allows us to downcast a data type from one to a more specific one in the same hierarchy. But why not declare the variable we need to the appropriate type during programming time rather than downcasting it at run time? I don't …

Member Avatar for Ancient Dragon
0
358
Member Avatar for zest

I want programming network use language C++, I don't want use langage VC++ but I want use tool VC++. Can I do it? If language C++ do it, can you show me to do this ? I tryed search ebook for it in few weeks, but I can't search it. …

Member Avatar for Ancient Dragon
0
97
Member Avatar for kursist

Hi, I have problem putting a value to 16 bits variable. Here is, how I am doing it. [CODE]typedef unsigned int UINT; typedef UINT* ID_PTR; unsigned short int myclass[5]; const ID_PTR arr16_bit[5] = { (UINT*) &myclass[0], (UINT*) &myclass[1], (UINT*) &myclass[2], (UINT*) &myclass[3], }; [/CODE] Now accessing the myclass like this. …

Member Avatar for kursist
0
94
Member Avatar for Adrian99420

Hi, I created a few window forms and I faced problem when try to link them up. I am able to link up two window form but the problem comes when I tried to link up more than 1 window forms. For example when I want to link up the …

Member Avatar for Nick Evan
0
89
Member Avatar for knewc

*EDIT* INTERPRET! lol....sorry! Write a recursive function array_sum(int *array, int size, int index) that computes the sum of all the elements of the array starting with position "index". Okay thats not too bad..but then he said this for example, if an array A holds the values 5,4,3,2,1 then the call …

Member Avatar for VernonDozier
0
96
Member Avatar for DOPY

Hello i am using a public computer (im just starting out with c++) so i dont have the code on me but i have figured out how to create a text file. what i want to know is when i create it, it places it in the direcotry that my …

Member Avatar for DOPY
0
258
Member Avatar for kse989

The assignment is to, using the given header file, write an implementation file, a menu-driven test file, and a car wash simulator... [B][U]Please see attachment for complete instructions[/U][/B] This is what I have so far, I am having trouble with my print function... I am new to Queues and not …

0
75
Member Avatar for prushik

Basically I want to set up a 3-dimensional array, but I want to dynamically allocate memory for it. Say I read 3 variables from a file, all ints: f, s, and v. i want to allocate memory for array[f][s][v] array is part of a struct How would I go about …

Member Avatar for dougy83
0
89
Member Avatar for Monte

Hey guys i'm taking a c++ class and I know this is easy material but im not sure if a function call can have like m+n or FMAX and stuff. Any help with this would be great thanks. Determine which of the following function calls are invalid and explain why. …

Member Avatar for Ancient Dragon
0
117
Member Avatar for Jacky1

Hi I need help with the remove function in the AVL tree void remove( generic x ); Thank you guys

Member Avatar for Jacky1
0
91
Member Avatar for bigbadowl

I have written the code below to highlight words in quite large documents. Problem is: 1. It needs to be case insensitive, ie: "dog" or "Dog" should match "dog" 2. It currently matches words inside other words Can anyone help? Many thanks [CODE=cplusplus]void highlightTerms(vector<string> finalWords, string *source){ for (int i …

Member Avatar for ivailosp
0
117
Member Avatar for noraantonia

Hello, I just downloaded the latest gd library, unziped it - i downloaded a dll version and a source code version. I have problems whit using it in my msvc application. I will paste here the install specifications for visual c++ users : [code] [I]Instructions from the gd site :[/I] …

Member Avatar for noraantonia
0
614
Member Avatar for Arne Kristoffer

Hello! Is there any way that I could create a loop that will user the content from a text-file and the number of lines? I want to go through a file and look for something, and then I need to use line by line, not char by char. Maybe the …

Member Avatar for Narue
0
77
Member Avatar for CNSK207

Hey I'm new here to these forums and I'm in need of some help with my program. I'm supposed to write a program that will allow the user to enter up to 100 values into an array. The program will then count how many values were entered and display the …

Member Avatar for vmanes
0
117
Member Avatar for Black Magic

Help please, just made this little program, no errors but it does not write any text for me on Dev-C++. [code]#include <iostream> using namespace std; int main() { system("title Array Program."); int myArray[5]; int loop; for (loop = 0; loop > 5; loop++) { cout << "Value for myArray[" << …

Member Avatar for Black Magic
0
86
Member Avatar for skatamatic

I've recently made a pi calculator out of a pretty rediculous algorithm (which is incredible accurate by the way). Unfortunately, C++ doubles can only hold 16 digits of it! I know that's plenty enough for any practical applications, but I want more accuracy! (Call me insane). I'm just looking for …

Member Avatar for skatamatic
0
147
Member Avatar for dkwantee

Hello! The text file is separated by tabs..I have used a struc as below: [CODE]struct scores { int maths int phy; int bio; int chem; int eng; int total; }; struct class { int class_id; char name[50]; }; ifstream fin; fin.open("marks.txt"); char buf[100]; string a; getline(fin,a); char delims[] = "\t"; …

Member Avatar for Lerner
0
519
Member Avatar for buddha527

I was given this code by my professor [CODE] main.cpp #include "home.12.h" int main() { cout << mystery(30) << endl; return SUCCESS; } // end of main //========================================= functions.cpp #include "home.12.h" int search(int first, int last, int n){ int returnValue; cout << "Enter: first = " << first << " …

Member Avatar for buddha527
0
117
Member Avatar for driplet

I use the following code to read data from a txt file: File2Open = "data.dat"; if((In=fopen(File2Open,"rt")) == NULL) { Application->MessageBox("Open data file failed.", NULL, MB_OK); return; } handle = open(File2Open, O_RDONLY); do { Readin1; Readin2; }while(!eof(handle)); Readin1 and Readin2 are two subroutines and consist of many lines of fscanf(In,"%s",&TTT) to …

Member Avatar for Salem
0
110
Member Avatar for tootypegs

Hi, at the moment i have a program that examines a file, does some processing and then outputs the results in a file. Is it posible to examinemultiple files stored in a folder all at once, then output the report files in a seperate folder without having to run my …

Member Avatar for tootypegs
0
112
Member Avatar for computer engW

Hi everone, Today i have a question has two parts and i did what i undrstood.If threr are mistakes ,please tell me. The Question is: [quote]father decided to buy a new vehicle. He paid 20,000 QR in cash and the rest will be paid on settlements as follows:  1500 …

Member Avatar for Black Magic
0
107
Member Avatar for Nemoticchigga

Does anyone know the size of an enum? If i have [CODE]enum foo { YES, NO, MAYBE };[/CODE] is that 1 byte, but if i had 10 enumerations would that be 2 bytes, and so on? Thanks.

Member Avatar for Narue
0
118
Member Avatar for daviddoria

I have 2 classes, Edge and Point. Edge contains Point P1 and Point P2 as private memebers. Edge has accessor functions [code] Point getP1() { return P1; } [/code] and the same for P2. Point has << overloaded - [code] ostream & operator << (ostream &output, Point &p); [/code] I …

Member Avatar for daviddoria
0
134
Member Avatar for amt_muk

Hi What are the basic differences between the methods atol() and strtol()? Regards, Amit

Member Avatar for amt_muk
0
437
Member Avatar for ahjiefreak

Hi, I recently has a C++ code which only run on Fedora Platform. I wanted to run debugging on these code as I came across some unexplainable scenario output. Can anyone suggest how could I use any debugger? I tried to use GNU GDB but then the code I am …

Member Avatar for ahjiefreak
0
245
Member Avatar for heav_yduty

Hi! Sorry, I couldn't find close topic. But maybe somebody can help me with my problem? I create a Word document, and I don't know how to paste the values of my variables in the document. For example, if i have the variable - int sum = 20, how can …

Member Avatar for heav_yduty
0
84
Member Avatar for Black Magic

Hi, im just bored so was mucking around on Dev-C++ and then was wondering - how could i make it so my program said a random sentance, like if i defined loads, and it said one at random. Could you help :).

Member Avatar for Ancient Dragon
0
81
Member Avatar for allialli

I have a class assignment of writing a program that: Start with the following program code. Write the function called "increment" which takes one integer parameter and returns that value plus one. [code=cplusplus] #include #include using namespace std; // YOUR FUNCTION GOES HERE! int main() { int input; string keepGoing; …

Member Avatar for bugmenot
0
246
Member Avatar for computer engW

Hi ; I know how to solve the same problem if i have limit numbers ,but here i have n intergers .How can the compiler understanst me when i need n integers ,like this question: [COLOR="Red"]Write a program that takes an n number of integers and calculates their average.[/COLOR] Using …

Member Avatar for computer engW
0
95
Member Avatar for digital_ice7

why cant it work properly??? [CODE]#include <iostream> #include <fstream> #include <string> using namespace std; int main(){ ofstream out;//create output stream int acc_num[10]; for(int x=0;x<10;x++) acc_num[x] = rand()%10; //generate account number char acc_file[600]; for(int x=0;x<10;x++) acc_file[x] = acc_num[x] + '0'; out.open(acc_file, ios::out);//create & open output file out << "PACKAGE ID: "; …

Member Avatar for Nick Evan
0
107
Member Avatar for Spaiz

I wasn't sure where to put this topic, web or software development... The questions is this: is there a way to build a website with C? (not PHP calling C application) I read the web for a couple of days now, but I can't really find any explanation how to …

Member Avatar for jephthah
0
58
Member Avatar for Suraine

i figure out that srand() and rand() are not quite good in creating a random number. for: [code]while(true){ int x = 0; srand((unsigned)x); int r = random(); cout<<r<<endl; }[/code] It gives back the same number. Am I doing something wrong? If not, is there anywhere that we can create our …

Member Avatar for vmanes
0
84
Member Avatar for fredmac

parking garage charges a $2.00 minimum fee to park for up to three hours. The garage charges an additional $.50 per hour for each hour or part thereof in excess of three hours. The maximum charge for any given 24-hour period is $10. Assume that no car parks for longer …

Member Avatar for jephthah
0
349
Member Avatar for veronicak5678

I am trying to write a "censor" program. here are the instructions: Write a program that reads a file of text and replaces each `target' word with its first letter followed by a string of asterisks that indicate its length. Have it read the list of target words from a …

Member Avatar for veronicak5678
0
185
Member Avatar for Yellowdog428

Wow, I am having huge problems passing values between functions and wrapping my head around pointers. For some reason when I tried to return values from functions they would not pass and when I tried putting pointers in the place, passing them kept giving me compiler errors. Now I have …

Member Avatar for Yellowdog428
0
98
Member Avatar for inamabilis

Hi, First off apologies if this is in the wrong forum - moderators feel free to move it if it is, or ask me to repost somewhere else. Now, my actual question is as follows. If I understand correctly by initiating a hook using SetWindowsHookEx then my hook will be …

Member Avatar for inamabilis
0
79
Member Avatar for WonderWomen204

I have to do an assignment for class. Here is what the assignment is: Start with the following program code. Write the function called "increment" which takes one integer parameter and returns that value plus one. [code] #include #include using namespace std; // YOUR FUNCTION GOES HERE! int main() { …

Member Avatar for Ancient Dragon
0
122
Member Avatar for infernojmd

my out put file comes out like 0105000011500970099001120011600108001 and so on for a while. any one help me figure out wat is wrong with my code. oh yea and what is in the input file is it-is a-CaPital Mistake tO-theorize Before-one has DatA123. [CODE=cplusplus] #include <iostream> #include <iomanip> #include <fstream> …

Member Avatar for Ancient Dragon
0
123
Member Avatar for cquestion

Hello: I'm almost killing myself to figure out the problem with the attached code. It seems that passing a text array to a function is impossible. Anyone is so kind to help me, please.

Member Avatar for Ancient Dragon
0
93
Member Avatar for starkman

Hey All! I am trying to implement a clutch like system in a little project I'm creating, Basically i am extracting information from a .csv file of the location of a users gaze whilst studying a standard desktop... I have the methods, MoveClickGaze, and MoveMouse, however i want to implement …

Member Avatar for starkman
0
103

The End.