49,761 Topics

Member Avatar for
Member Avatar for monkey_king

I'm having difficulties understanding and printing the max value of a size_t type. Apparantly the size_t is typedefed to a unsigned long int on my system. Is this safe to assume its the same on all c++ compilers? The 'sizeof' function returns the number of bytes(size char), used to represent …

Member Avatar for idallen
0
1K
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
126
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
192
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
114
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
127
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
135
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
92
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
288
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
149
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
182
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
116
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
274
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
161
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
190
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
168
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
118
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
129
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
104
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
122
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
33
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
163
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
145
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
85
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
34
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
114
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
130
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
344
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
196

The End.