49,755 Topics

Member Avatar for
Member Avatar for bobbyg118

I am new to this website and was looking for some help .I am currently having trouble because I need to take the function generateOutput and have it display three random messages: Excellent, Good Job, and Very Good. Attached is the .cpp file

Member Avatar for Ali Shah Ahmed
0
97
Member Avatar for mebob

Hi, I recently downloaded the GMP library, and I am completely lost in building it. I tried building it, but it just doesn't want to work for me. I want to build the C++ wrapper. BTW, I have never built a library before, so please excuse any of my stupidity …

Member Avatar for mebob
0
87
Member Avatar for kratosaurion

Hi guys, when I was working on this game for school I ran into a weird linker error, LNK2019. It bugs me to no avail, so hopefully you guys can help me. It seems to be a problem with the string pas. I submitted alternate values for where they would …

Member Avatar for LevyDee
0
148
Member Avatar for LevyDee

I'm working on a chat server/client program. So far Ive gotten to where I am by using examples and using msdn. So my problem now is getting my client to properly connect to my server. When I run my server and locally connect through telnet on my computer, it runs …

0
48
Member Avatar for nu2cpp

Hi Guys, I am running vc in visual studio 2009. I have a code that I wrote to read a binary file a while back using c++ (all in a console). Now I am trting to update the code using a GUI. In the console version the file location was …

Member Avatar for Narue
0
96
Member Avatar for corby

hey guys/gals. how do i save to a file the data that is printed by this program i wrote. I have the code to do this in the createFile function but i am unsure in how to output what was printed. Any suggestions? [CODE]//class member functions #include "experiment.h" Experiment::Experiment() { …

Member Avatar for hnizamoglu
0
139
Member Avatar for fougere

Hello. I am writing a program with some dynamic arrays of pointers to objects (not arrays of objects). Since there will be A LOT of tacking on new objects to the arrays, for the purposes of efficiency, I am implementing an algorithm to fill up a buffer array first and …

Member Avatar for fougere
0
149
Member Avatar for abhimanipal

Hello Everybody, I have a small doubt regarding how we can call constructors in a C++ class [CODE]class test { public: test() { cout<<"In test\n"; } }; int main() { test t1; test t2(); // This call does not give compile time error but does not call the constructor cin.get(); …

Member Avatar for abhimanipal
0
100
Member Avatar for numbawang

hi there, im a student in gr11 currenting taking computer science. I have a summative due 2-3 days from now and need help with explantion on one part of my program that im missing. So far I've learned, functions,loops, and some understanding of arrays. The project is to write a …

Member Avatar for daviddoria
-1
122
Member Avatar for vivosmith

Hi I found this example on about.com . I understand most of this, but one part is giving me problems in genral. I tried classes before, and it did not go over so well. But since this is someone else code, it might be better than mine :). Thanks [CODE] …

Member Avatar for Fbody
0
100
Member Avatar for Piyush07
Member Avatar for Fbody
-1
39
Member Avatar for mcheng

Hi, i'm new to C++ and i understand someone else has asked this question on this forum before. I read the replies but still don't know how to resolve my error. gcc version is 4.2.2. The linker error i encountered is build_products/shared/x86/sgos_native/debug/gcc_v4.4.2/ced.o: In function `CEA_Disk_lister::CEA_Disk_lister(CEA_Disk*)': ced.cpp:(.text._ZN15CEA_Disk_listerC1EP8CEA_Disk[_ZN15CEA_Disk_listerC1EP8CEA_Disk]+0x25): undefined reference to `vtable …

Member Avatar for Narue
0
1K
Member Avatar for c++lover

i'm new here and i have a question regarding pointers that is here You are required to write a program that takes a phone number as input from the user and stores it as a string value. The phone number will consist of country code, city code and actual 7-digit …

Member Avatar for daviddoria
0
126
Member Avatar for j.kelly

I am new to C++ and cant get my program to compile because of #include recursion. I have 3 classes A, B, C. A includes B.h and C.h B includes A.h C includes A.h and B.h They include each other because they either need to send messages between themselves. No …

Member Avatar for faaano
0
2K
Member Avatar for spartan118

Hope your ready :P [CODE] /* THIS PROGRAM IS INCOMPLETE!! PLEASE DON'T CORRECT THE EMPTY FUNCTIONS!! Thanks, Spartan118*/ #include <iostream> #include <string> #include <windows.h> #include "H:\profile\desktop\rawrr\lvp\random.h" #include "H:\profile\desktop\rawrr\lvp\conio.h" #include <fstream> using namespace std; void combat() { randomize(); string object; cout << "Entering combat." << endl; cout << "You are behind …

Member Avatar for abhimanipal
0
95
Member Avatar for kourt32

im trying to use stacks to output files with names here is what i have so far ive tried every combination of file.open i could think of any suggestions? [CODE] #include <iostream> #include <string> #include <fstream> #include <stack> using namespace std; int main(){ stack<string> filename; string fname; int count; ofstream …

Member Avatar for mitrmkar
0
102
Member Avatar for Cowbox

Hai, I've been fiddling around with char, char* and string and thoroughly confusing myself as to what the actual differences are but all in all, I couldn't seem to figure out a way to edit a string/char/char* to do something like this automatically: [I]"File1.txt" "File2.txt" "File3.txt" etc.[/I] None of the …

Member Avatar for Cowbox
0
107
Member Avatar for sandhya.chethu
Member Avatar for anuragcoder

As the title suggests Any help for keypress action folks?? Do we have a keypress func in c++. I'm runnin Win Xp Dev c++

Member Avatar for daviddoria
0
106
Member Avatar for anuragcoder

Can anyone of you suggest, how to create syntax highlighting functionality I would like a code snippet. Please, Anurag

Member Avatar for anuragcoder
-2
83
Member Avatar for anuragcoder

This is my code to create a new file below. The main problem is that the program does not halt for entering file name and also the program creates a file .txt and doesn't save anything in it. Please Help [CODE]int newfile() { system("cls"); cout <<"\t\t-------------------------------------" <<endl; cout <<"\t\t| NEW …

Member Avatar for daviddoria
0
103
Member Avatar for ziwacha

hi may u pliz assist,im a learner of C++,I want to write a code which welcomes you into a bar,asks your age,if u are more than 50yrs it gives it gives one free beer,it prompts you to press some orders and it will calculate the total due amount

Member Avatar for joker400
-4
59
Member Avatar for foco

Is it possible to return values from a shell prompt back into c++ as a variable? IE: If I have the line [ICODE]system("cat *txt");[/ICODE] I am unable to store any of the results within my c++ program. Thanks!

Member Avatar for daviddoria
0
54
Member Avatar for freemanirl

So, I made this function to return data from the registry. I'm going to be calling different things from different places to get hardware information. Unfortunately, it works the second time you call it. Here is the output: Could not find value: Identifier Returned: ?? Returned: x86 Family 6 Model …

Member Avatar for freemanirl
0
227
Member Avatar for Spiderpig085

Hey guys, just wonderin why I am getting a compiler error on this code... I've had this error before and spent ages tryin to fix it.... But i can tfor the life of me remember... Thanks to all who reply...:) [ICODE] class Date { public: Date(); private: }; class Time …

Member Avatar for Spiderpig085
0
94
Member Avatar for deanus

Hi, can anyone tell me how to access a specific memory location in C++ (I use Dev-C++ 4.9.9.2) without the OS giving me an error and stopping the execution of my prog? I've tried the following code on both WinXP and Win98, but they both gave me an error : …

Member Avatar for deanus
0
217
Member Avatar for daviddoria

Some of you may have noticed that I am always harping about "abstracting the problem" and "posting the smallest compilable piece of code that demonstrates a problem." I rambled a bit about why this is important if anyone cares to read: [url]http://daviddoria.blogspot.com/2010/05/problem-abstraction-helping-others-help.html[/url] Dave

Member Avatar for Ketsuekiame
0
85
Member Avatar for weaponx69

Hello all, I'm am trying to get this program to work for class tomorrow. Maybe someone would be kind enough to be able to check it out for me. I'm using the g++ compiler in Ubuntu trying to get this openGL application to work. It compiles fine but has a …

Member Avatar for weaponx69
0
122
Member Avatar for ARKaMAN

Hi I have The following code [CODE]// This is the weapon ban list. Anything here will be taken away from the player. isValidWeapon(weapon) { switch(weapon) { case "gl_ak47_mp": case "gl_m16_mp": case "gl_m4_mp": case "tavor_gl_xmags_mp": case "none": return true; } return false; } // This Checks right away at spawn. ARKaMAN …

Member Avatar for Ketsuekiame
0
190
Member Avatar for theABCasian

trying to figure out the reason for memory loss any ideas would be helpful requirements should be done however i need a working file for turn in thanks for help. leak seems to be around line 59-61 i think in demo.cpp Demo.cpp [CODE] /* File Name: Demo.cpp Chapter No. 15 …

Member Avatar for Ketsuekiame
0
265

The End.