51,593 Topics

Member Avatar for
Member Avatar for Hidden_mistakes

I am trying to write a racing game but i need some winning conditions. Im not sure where to start, any pointers would help. Im using Visual C++

Member Avatar for VernonDozier
0
129
Member Avatar for ushineon

Hi All, Awesome site. Thank You !! Just a few quickies , is the C language here to stay ? Does anyone know of a language that may replace it in the future? What compiler do you all recommend for compiling C? What languages should I learn to help me …

Member Avatar for jwenting
0
215
Member Avatar for hlmjohnson1981

I'm towards the end of my problem. I just need assistance when comparing classes. I'm trying to compare the two Grade point averages, and whoever has the highest, I would like to be announced or displayed. Any help or hint is appreciated... [code] #include<string> #include<iostream> using namespace std; //class of …

Member Avatar for tonytheking1
0
195
Member Avatar for Hatem Faheem

- I've Implemented a very simple non repeated random generator and I want to share it for anyone .. - I want Your Opinions Please , and any comments about my code - Anyone notice any fault in the result (any repeated numbers), please report me - Thank You Very …

Member Avatar for VernonDozier
0
116
Member Avatar for jacksonville

Hi, I've just joined this website for help with some C++ problems. I am new to C++ and face the task of reading from a text file and outputing the result in another text file using the[B][COLOR="Red"] istream& operator >>(istream& stream, storage &s)[/COLOR][/B] it looks like something underneath: istream& operator …

Member Avatar for Lerner
0
130
Member Avatar for Samoht VII

Ok so i have to print a table of data like so.. SURNAME LAST NAME ADDRESS POSTCODE right? but the problem is the text won't align to the appropriate heading. so when i try to use tabs if someone has a longer surname or whatever this happens. [CODE]SURNAME\t LAST NAME\t …

Member Avatar for corby
0
138
Member Avatar for hurricane123

I need clues for making a programe suppose there is sample data set in file sp13Input.txt. A 555-1234 B 555-1111 C 555-2222 D 555-3333 E 555-4444 F 555-5555 G 555-4321 z 000-0000 we have to make linear search,by giving the number and it will display the name of the person …

Member Avatar for hurricane123
0
95
Member Avatar for Hidden_mistakes

I am trying to get music to loop in the background of a game. However im really not sure how to do this. Can anyone give me a starting point please? I am using Visual C++ btw.

Member Avatar for Hidden_mistakes
0
295
Member Avatar for NathanOliver

Hey all I have been writing my own implementation of a BigInt class and I think I have most of it down. I am using a vector<int> container for my number. I'm curious to what you guys think about. This is my first program using 1000+ lines of code. Please …

Member Avatar for NathanOliver
0
151
Member Avatar for donaldw

I am using MS SAPI (5.1 or 5.3) to read a script using a call like this (in MS VC++): [CODE]Voice -> Speak(script.AllocSysString(), SPF_DEFAULT, NULL);[/CODE] I want to be able to limit the total duration of the time spent reading the text to length X (hard limit). Is there a …

Member Avatar for donaldw
0
186
Member Avatar for 1manik

Hi, I want to ask you, how can I do a program, which will be read characters from a keyboard in random time. I mean it, that if I write some characters on a keyboard in every time, when I come to the PC, it save it to txt and …

Member Avatar for Salem
0
118
Member Avatar for MrJNV

So I have this assignment in which I need to use Selection and Projection operators on n-ary relations. The book really doesn't cover it in a way I understand and doesn't explain it in terms of c++, so could someone help me out. Could someone give me a "c++ code …

Member Avatar for MrJNV
0
276
Member Avatar for CobraAviTek

Hi, I've been working on this one problem in C++ for hours, starting last night. I haven't been able to figure it out completely but have been able to complete 3 of the 6 functions required for the program. I'm in the process of completing the fourth and have run …

Member Avatar for Lerner
0
1K
Member Avatar for miskeen

Hello guys, I've a class with a cpp and .h files. It's a part of a large program. I would like to create an array of structs and use it wherever in the same class, i.e. I want to initialize it in a specific function and use it in other …

Member Avatar for miskeen
0
162
Member Avatar for yznk

In my code my "ndeps" is not being declared in my "setdepends" function and i dont know why. Can anyone help me figure out why? [CODE] #include <iostream> #include <fstream> #include <cstdlib> #include <cstring> using namespace std; class Object{ private: Object **depends; int ndepends; public: Object(); char *id; enum Color …

Member Avatar for Stefano Mtangoo
0
192
Member Avatar for Tellalca

I got some linker error, couldnt find the mistake. What is wrong? [CODE]#include "myStack.h" //Imports the Stack header file containing the declaration of the member functions myStack::myStack() /*The stack is initialized as empty */ { count=0; } //end of Stack::Stack constructor Error_code myStack::push(const Stack_entry &item) /*If the stack is full …

Member Avatar for Tellalca
0
173
Member Avatar for K0ns3rv

Hello fellow daniwebians. Consider the following constructor: [CODE=C++] Vector3f::Vector3f(float* f) { x = *f; f++; y = *f; f++; z = *f; } [/CODE] Now let's create an object of the Vector3f class [CODE=C++] //Create an object of Vector3f Float f[] = {13,3,7}; Vector3f myVector(f); [/CODE] All is well right …

Member Avatar for K0ns3rv
0
122
Member Avatar for Lukezzz

Hi, I have a special question about banners that usually is possible to put on a webpage with HTML code. The HTML code holds some addresses to this specific banner in form a http:// addresses. As C++ can call addresses like this my quesiton is this: Is there any possibility …

Member Avatar for Lukezzz
0
134
Member Avatar for Fernand0

Hey, before everything, sorry about my english, i will do my best I'm really new at this, i just want to know where i should start learning about security, control of ports, control the sockets already initialized for other program, viruses, spywares, hack, nukes, etc.. I'm just asking for sources(i …

0
107
Member Avatar for warne

Hi, CPP : How do i call a function in another program? the main function is in one program and i want this main function to call a function in another program. Can anyone please give me the sample code for this? Thanks in advance

Member Avatar for corby
0
125
Member Avatar for byrnnryb

Hello all, I am trying to find a way to graph the [URL="http://en.wikipedia.org/wiki/Fresnel_integral"]Fresnel integrals[/URL] for a Numerical Analysis class. We have to use Romberg Integration to do this, and I suppose I am confused as to how I can graph this (I am confused when it comes to integrals.) I …

0
34
Member Avatar for attackthis

So far I have this as my main [CODE]#include <string> #include <iostream> # include <fstream> #include "money.h" using namespace std; int main () { ifstream infile; ifstream outfile; infile.open ("transaction.dat"); int precision = 6; int width = 20; if (infile.fail ()) { cout << "Opening input failed" << endl; } …

Member Avatar for attackthis
0
167
Member Avatar for dualdigger

Hi; I have a Q/A based game which randomly selects questions that are stored in access file table. I have define a vector and a stdstream that takes no of questions as input. The no of records are 300 and I want the program to select only 30 questions but …

Member Avatar for dualdigger
0
147
Member Avatar for notmasteryet

trying to make a tictactoe (in class) c++ program but i cant seem to get the board printed when i enter the 2nd set of numbers. if you see nay other mistakes please let me know ..... thanks in advance first time here :) [// [CODE]#include<iostream> using namespace std; const …

Member Avatar for MaraShyla
0
89
Member Avatar for ppotter3

I am currently writing a program called Encoding and Decoding strings with the Enigma Class. This was a class assignment, but it already has been turned in, and I would like help (I am not looking for the work to be done for me) so I may learn from my …

Member Avatar for ppotter3
0
2K
Member Avatar for rawan_22

hello, I am using visual studio 2008 with C++ (MFC) project and I want to add a reference to this project, I want to add an .exe file as a reference because this reference can converts the text to speech and i want that because my project must speak the …

0
35
Member Avatar for Ricky65

Hi I'm attempting to copy a file to a buffer using the ReadFile Win API. It works fine for text files but for other file types, for example .exe, it only copies the first few bytes. I can't identify the problem. I would greatly appreciate it if somebody can help. …

Member Avatar for Ricky65
0
115
Member Avatar for Exaktor

Hi, I have 4 searchbox and with them i can search in a Datagridview. But the problem is that they are not connected to each other. So what I want is that they are connected to each other. If i search in 'firstname' then the firstname displays but when I …

Member Avatar for phoenix911
0
271
Member Avatar for satimis

Hi folks, C++ and Java are platform independent. It is for sure. Java is a resource hog. The learning curve of C++ is quite steep at start. What I'm going to use C++ is to build a platform independent software with sound and graphic integrated as well interactive. Would C++ …

Member Avatar for Stefano Mtangoo
0
133
Member Avatar for vanalex

Hello everybody. I want to make a piece of code that its main job will be to swap rows in a 2d char array. I wrote the following piece of code: [CODE]#include <iostream> using namespace std; void swap(char *s1, char *s2); int main() { char arr[3][10]; cout << "give me …

Member Avatar for WaltP
0
346
Member Avatar for schwab

I need to make a towers of hanoi program using vectors. the code I came up with works fine without the vectors. I have no clue how to make it work with vectors. any help? thanks [CODE]#include <iostream> #include <vector> using namespace std; void towers( vector <int> &disks, int start, …

Member Avatar for WaltP
0
201
Member Avatar for eDeloa

I get the following errors on the line with "static const string ...": [CODE] error C2059: syntax error : '{' error C2334: unexpected token(s) preceding '{'; skipping apparent function body[/CODE] when trying to compile something like this: [CODE] #ifndef TEST_H #define TEST_H #include <string> using namespace std; class Test { …

Member Avatar for kvprajapati
0
2K
Member Avatar for gregarion

Hey guys , im having a problem in starting a project. Basically , i am suppose read from a file(Data.txt) and then display the information in that file in a new format. Data.txt HIstory M123 Maths M103 Science M111 English M105 As the results needs to be displayed based on …

Member Avatar for pecet
0
110
Member Avatar for Hidden_mistakes

Hi i am hacking a pong game into a racing game. At the moment i am trying to blit to a half screen with player A on th right and B on the left. any one know why it isn't working? I am using Visual C++. [code]/* Pony Pong #include …

Member Avatar for Salem
0
102
Member Avatar for thehivetyrant

Hi there, I have this cube which i rotate around a centre, I'm attempting to make it register when i move a sphere beyond it's x,y,z position. However the cubes x,y,z position seems to be it's origin of rotation and not it's actual current position. I believe this is because …

Member Avatar for thehivetyrant
0
217
Member Avatar for coding101

user enters up to 20 charachters that are of digits 1-9 so enter a number: 109832032 i need to get each charachter and convert it to an int. so '1''2'''3''4'=1234 how do i convert it, im using arrays and a ton of if statements, but its not working check my …

Member Avatar for WaltP
0
131
Member Avatar for thehivetyrant

Hi there, I have an OpenGL scene containing a circular plane, ball and box. I'm attempting to set up bounding box's around each for a primative form of collision detection. I am trying to follow a tutorial from here: [URL="http://www.morrowland.com/apron/article/gl/boundingbox/index.php"]http://www.morrowland.com/apron/article/gl/boundingbox/index.php[/URL] But it says i should use TVector3 ... i have …

Member Avatar for thehivetyrant
0
95
Member Avatar for bbrradd

my code will read in a file and put the integers in the file into the array. It reads in and displays the integers perfectly, but i am stuck on how to find the factors of each number in the array. when i use my code i get the error: …

Member Avatar for StuXYZ
0
106
Member Avatar for godflesh231

i have been trying to debug this program for about 2 days(not the whole days, just when ive been coding) and i still cant find the source of this bug. i have been trying to create a class factory system for a game that i want to make. first, let …

Member Avatar for godflesh231
0
123
Member Avatar for Crow13

I cant figure out how to finish this assigment =\ Help >.< Hm.. Sry for the other language used in it =\ This is the language we are being taugh in >.<' Cik skaitlu ivadiisiet? = How many numbers to enter? Ievadiet skaitlus = entered numbers Ievadiitais masiivs = entered …

Member Avatar for Crow13
0
113
Member Avatar for tarheelfan_08

Can someone tell me why my code is not writing to a data file! I get no errors and everything looks great! [code] #include "Account.h" #include <iostream> #include <fstream> #include <cstdlib> // for exit function using std::ofstream; int main() { ofstream outdata; const int SIZE = 6; //Account array Account …

Member Avatar for tarheelfan_08
0
213
Member Avatar for zango

Basically, here is what the program is supposed to do: 1. Create a ResistorClass overloaded assignment (=) operator function which shall do the following: * Overload the assignment operator ( = ) to assign all m_dptrRes data values of an object of class ResistorClass to another object of class ResistorClass. …

Member Avatar for zango
0
130
Member Avatar for raseru

There's mountains of guides for learning C++ and they all cover from hello world to pointers, but I never see any of them make a peep about making an actual window. They all stay in consoles and that's that. Why is this? Do most people never mess with API and …

Member Avatar for Frederick2
1
970
Member Avatar for nnhamane

[B]Hi friends..I had written a program on solving sudoku in 'C'..But it is not running...My logic is correct..I think that problem is in [I][U]solve[/U][/I] or [I][U]check[/U][/I] function..Plz check my program..it will take few minutes..n plz tell me what is wrong in program?? my id: <email nipped> Thx friends..[/B] [CODE]/*PROGRAM FOR …

Member Avatar for peter_budo
0
2K
Member Avatar for godflesh231

What makes pointers different to normal variables, and what is the point of using them over normal variables? I want a long and detailed description please :D

Member Avatar for K0ns3rv
0
144
Member Avatar for pixelerator

i want to assign a integer of 100 digit length to a object. like class hugeint { /// }; void main() { hugeint a,b,c; a=10000000000000000000000000000000....100; b=20; c=a+b; } can any buddy suggest me any simple idea to achieve this..

Member Avatar for pixelerator
0
200
Member Avatar for timbomo

error C2297: '>>' : illegal, right operand has type 'void' error C2296: '>>' : illegal, left operand has type 'float' error C2297: '>>' : illegal, right operand has type 'void' warning C4552: '>>' : operator has no effect; expected operator with side-effect. i get these errors and i dont know …

Member Avatar for kvprajapati
-2
1K
Member Avatar for tarheelfan_08

Hey guys! I have my code wrote and when I run it, the code gets all the way to this point [code] //Delete Account 333411 cout << "Here you will delete the account 333411: \n\n"; AccountVector.erase (AccountVector.begin()+2); //Print the details of the vector for (int i = 0; i < …

Member Avatar for tarheelfan_08
0
117
Member Avatar for zaharaandfarah

hi. 2 all anyone can tell what is the wrong with this code? the result of this program is : cos(60)=-0.952413 sin(60)=-0.304811 [code]#include <iostream.h> #include <math.h> main() { float x,y,z; y=cos(60); z=sin(60); cout<<"cos(60)="<<y<<endl; cout<<"sin(60)="<<z<<endl; }[/code] cheers

Member Avatar for n.utiu
0
85
Member Avatar for rena0514

i have to creat a program that verifes a valid user id before printing out the new email address. here are my errors: [CODE]c:\users\rena0514\documents\visual studio 2005\projects\user_id\user_id\verification.cpp(50) : error C2664: 'strncpy' : cannot convert parameter 2 from 'std::string' to 'const char *' 1> No user-defined-conversion operator available that can perform this …

Member Avatar for Salem
0
186

The End.