49,757 Topics

Member Avatar for
Member Avatar for clickspiker23

Im trying to learn c++ and i got a book which is not that great in my opinion, due to errors. one of my problems im having with one of the exercises is trying to set values for food, land. every time i run the program i get a bunch …

Member Avatar for Duoas
0
106
Member Avatar for visom

Hi everyone. My code is used to calculate fractions and display them as "3/4 + 3/4 = 3/2" and such. I having some trouble with the the code segment [CODE] calculate.setadd(); calculate.setsub(); calculate.setmult(); calculate.setdiv();[/CODE] There's a red line under the close parenthesis saying "too few arguments in function to call". …

Member Avatar for visom
0
292
Member Avatar for Veneficus

Hello. So I am attempting to load a Bitmap into my project. I am using Visual Studio 2010. I am going to the resource view, right click, choose to add a new Resource, and from there I pick Import. Then, I simply select a .bmp file and I choose open. …

Member Avatar for mrnutty
0
99
Member Avatar for eman 22
Member Avatar for mrnutty
0
100
Member Avatar for ekailan

Is it possible to use file to increase the memory available. for example: if we ahve code need 1 GB RAM to be work is it possible to run it in a system with 512MB RAM and use a file to allocate the rest of the memory needed.

Member Avatar for predator78
0
111
Member Avatar for Sonia11

I have written this code using templates which works very perfectly well. I am a beginner in using templates, so I really want someone to check if its written in a correct format. Because when I am deleting template<elemType> from the beginning of each function and main, the code is …

Member Avatar for mrnutty
0
307
Member Avatar for stereomatching

something like [code] class base { public : virtual void draw() const = 0; virtual void area() const = 0; }; class rectangle : public base { public : virtual void draw() const {std::cout<<"rectangel\n";} virtual void area() const {std::cout<<"rect area\n";} }; class triangle : public base { public : void …

Member Avatar for thekashyap
0
148
Member Avatar for predator78

Hi from what I have seen this should be correct but compiler is complaining. [CODE] #include <iostream> #include <string> using namespace std; // player class class Player{ int *position; string name; public: Player(); ~Player(); void set_name(){ cout << "enter name: "; getline(cin,name); cout << "name is now: " << name …

Member Avatar for predator78
0
95
Member Avatar for jowana

Hello, how can I pause the terminal after running the program? I am using a program that outputs a table of error rates.. but can't see the result. I used few suggestions on the web but still not working , char d; cin>>d; not working , what else can I …

Member Avatar for sergent
-1
212
Member Avatar for Ertzel

I am trying to use the Net User command from the cmd in my C++ program. I have this... [CODE]char acUserName[100]; DWORD nUserName = sizeof(acUserName); if (GetUserName(acUserName, &nUserName)){ cout << "User Name: " << acUserName << endl; system("Net User"); }[/CODE] This displays the User Name on the screen and then …

Member Avatar for Ertzel
0
145
Member Avatar for jayrpalanas

anybody can give me the free link for c/c++ software?...please give me... thank you!!!

Member Avatar for iamthwee
0
165
Member Avatar for SQLpower

Hello, guys. I found useful stuff so far. I'd like to ask if someone can give me some ideas how to wandering guards or set switches to open certain doors in a maze game in c++? At the moment I am thinking just to add some bits, can someone give …

Member Avatar for iamthwee
0
317
Member Avatar for infiniteloop56

Hey everyone, I am new to this site, basically my problem is this: The user inputs an integer, and then the user inputs a character, the program is supposed to make a triangle out of the character, with the max width of the user inputed integer. for example; user inputs …

Member Avatar for goldzero
0
1K
Member Avatar for SQLpower

Hello. I have some problems understanding the code. I'd like to ask for some help. I need someone to break it down for me. Just to explain what's going on and what's happening. Well this is map.cpp: I got the other bits but I am struggling with this one and …

Member Avatar for Sky Diploma
0
201
Member Avatar for DerrickC

I have written the following program. It collects inventory information and stores it in a file. I need to write a separate program that will access that file and give me the totals of the information stored in it ie. (quantity,wholesalecost,retailcost). What I'm specifically having trouble with is how to …

Member Avatar for DerrickC
0
183
Member Avatar for programing

plz help me with code c++ for binary full adder that sum to binaryn like 1111 + 0110 [CODE]#include <iostream> using std::cout; using std::endl; const int LENGTH = 5; char sumChars(char x, char y, char& carry); int main() { char first[LENGTH + 1] = "10100";// 20 char second[LENGTH + 1] …

Member Avatar for Sky Diploma
0
3K
Member Avatar for Muhammad Anas

A part of one of the programs in my assignment requires to declare three arrays of same size which will be used in parallel to store gpa's, registration numbers and names of the students respectively. When I use a single loop to take input in all these three arrays then …

Member Avatar for Muhammad Anas
0
2K
Member Avatar for gcardonav

Hi guys: The following code compares two folders and if the input is correct will print out the data. That's not my problem, I wanted to add an empty line when the comparison is incorrect. The things is that it adds a good amount of empty lines before I get …

Member Avatar for WaltP
0
220
Member Avatar for failbot

This should display 5 lines of code that say "test", yet I am only getting 4 and it is never reaching zero, since the output never displays, "the test is over". What is wrong with this implementation? I am quite sure it's an error in my next() function. Any help …

Member Avatar for predator78
0
164
Member Avatar for Jimmyteoh

1. when declare array, what the thing needed. 2. know how to build/use 2D array. 3. how the pointer relate to array. 4. give string manipulation function and describe it. 5. what is the key element for OOP. 6. define structure. 7. how destructor works. 8. define class.

Member Avatar for Veneficus
-5
112
Member Avatar for Red Dragon

the aim of this programme is to create a .txt file (of which the name is specified by the user) of all the items in a certain directory (also specified by the user) the problem is about half way down, the 'mydir' bit [CODE] #include <iostream> #include <fstream> #include <string> …

Member Avatar for Red Dragon
0
356
Member Avatar for kutuup

Hi, I'm working on an assignment where we have to have a client and server sending each other an integer that represents a noughts and crosses board. I had it working by simply sending back and forth the entire NoughtsAndCrosses class, but now we need to do it just using …

Member Avatar for kutuup
0
202
Member Avatar for phoneybone

I am wondering whether it would be useful to close [URL="http://www.daniweb.com/software-development/cpp/threads/70096"]this [/URL]thread an start a new one? This huge list, spanning 6 years and I don't know how many books cannot be useful, anymore? To be on-topic: for beginners, I'd suggest to just google "programming c++ tutorial", you'll get many …

Member Avatar for phoneybone
1
110
Member Avatar for stereomatching

As far as I know, if we don't ask template to generate the code for us It would not do it because template is "lazy". The codes generated by template are same as handcrafted codes, so what makes template being blamed by code bloat if you know how to handle …

Member Avatar for pseudorandom21
0
169
Member Avatar for polystudent

Hi All, Need expert to teach me how to solve the below C++ questions. Thanks (a) void Triangle (int, char) The function takes in two arguments, the integer representing the base and height; and the character representing either original or mirror. These values are use to print the triangle. For …

Member Avatar for pseudorandom21
0
117
Member Avatar for ekailan

" Unhandled exception at 0x76acfbae in AC.exe: Microsoft C++ exception: std::out_of_range at memory location 0x0015a140.. " Any advice on how to handle this error?

Member Avatar for pseudorandom21
0
60
Member Avatar for Gibran

Hey everyone, When i try to write any new c++ program and run it, it doesnt even build and a different one runs(the same one runs all the time). I use Quincy. However, any of my old c++ programs work fine, just any new ones that i try to run …

Member Avatar for sergent
0
168
Member Avatar for Derek Elensar

I have another problem... Let's start with said code: [code] #include <iostream> #include <fstream> //I have tried using fstream.h like my teacher instructs me to do/ #include <cstdlib> //but it gives me another error: see below, in actual post. using std::cout; using std::cin; using std::ios; using std::endl; //using namespace std; …

Member Avatar for Derek Elensar
0
1K
Member Avatar for lexusdominus

Id like to have my console program stopped and code executed if a timer runs out. does this mean i need another thread? can anyone point me to some functions i may need to use as ive never forked a program before. im using visual c++ on windows.

Member Avatar for Tellalca
0
514
Member Avatar for lexusdominus

Hey, ive got a problem. i cant seem to get Playsound() to work. Ive searched google, and alot of people say to go to properties - all configurations - linker - and add winmm.lib to the additional dependencies to link it. ok, so i did that, have included mmsystem.h, but …

Member Avatar for lexusdominus
0
95

The End.