49,761 Topics
| |
please make this code work for many inputs not just two inputs then it terminates [CODE] #include <iostream> // requires for keyboard and screen I/O #include <conio.h> // for getch using namespace std; void main () { // local values int frontPad; int rearPad; int door; // output to screen … | |
Hi. I am using Visual Studio 2010 for coding in C++. When I'm coding, I often make it to the bottom of the screen and the line of code I'm typing ends up at the bottom of the window - very annoying. I was wondering if anyone knew of a … | |
Hey I'm having a problem with a loop in my code. It's a pretty long problem, but it is a travel expenses program. I'm creating a function that calculates the meal expenses for the user. I have to get a total for two days(first day and last day). When I … | |
Ive been working on a solution to my homework problem for a couple hours and I believe I have found the answer but I keep getting this error code >Hw_3.obj : error LNK2019: unresolved external symbol "void __cdecl printTable(double,double,double,int)" (?printTable@@YAXNNNH@Z) referenced in function "void __cdecl process(void)" (?process@@YAXXZ) 1>Hw_3.obj : error … | |
i dont understand how templates can cause code bloat in a binary file...does anyone happen to have an easy to understand explanation of this? | |
Hi everybody, I am new to the programming world and I have an assignment that I need to write an array then a new array that needs to allocated dynamically and, then, populated in reverse order before being displayed all within a function. Here is what I have so far … | |
Could someone explain to me (in layman's terms please) when to use pointers, pass by reference, this pointer and friendly functions. I understand the concepts but I can't think on my own when to use them. Can someone explain? thanks. | |
Hello, I'm taking a 100-class (beginner) in C++ Currently I'm stuck in one of the assignments due where it asks for the program to have the user return to the beginning if there's an error, as well as create an out put of: + ++ +++ (...) The current code … | |
hi please solve my problem i am getting linking error in following program. i am using devc++ for copilation linking errors: C:\Users\shiv\AppData\Local\Temp\ccaMbaaa.o(.text+0x286) In function `ZN4list7delnodeEi': C:\Users\shiv\AppData\Local\Temp\ccaMbaaa.o(.text+0x286) In function `ZN4list7delnodeEi': [Linker error] undefined reference to `list::search(int, Node**, Node**)' C:\Users\shiv\AppData\Local\Temp\ccaMbaaa.o(.text+0x62c) ld returned 1 exit status [CODE]#include<iostream> #include<conio.h> #include<string.h> using namespace std; class … | |
Use a two-dimensional array to solve the following problem. A company has four salespeople (1 to 4) who sell five different products (1 to 5). Once a day, each salesperson passes in a slip for each different type of product sold. Each slip contains the following: a) The salesperson number … | |
im curious as to why in the world anyone would ever upcast or even downcast an object in their program? [CODE]class shape { }; class circle : public shape { }; int main () { circle a; shape b; b = (shape)a; return 0; }[/CODE] | |
Hi, this is a code for Simple Console based text editor from Complete Reference to C++ by Herbert Shildt: [CODE] #include "stdafx.h" #include "conio.h" #define MAX 5 #define LEN 20 char text[MAX][LEN]; int _tmain(int argc, _TCHAR* argv[]) { register int t, i, j; printf("Enter an empty line to quit.\n"); for(t=0; … | |
Hey guys, I'm making a small game on c++ using code::blocks.I use winbgi graphics for doing it. Its basically a ball game like dx-ball. I am an amateur programmer and I did upto making a moving ball which will rebounce whenever the boundaries of the screen are encountered.My method is … | |
Dear Friends! I don't know where it from getting arguments. I think there must b a predefine User define function Which is Passing arguments to the main Function. Please explain it I'll be very thankful to all of you. Please reply on my ID [I]email snipped[/I] Thanks :-/ | |
Hi all, I am looking for C++ multi threading under windows but i wasn't able to find any fruitful examples .Please provide me with some useful online books or links. TIA | |
please check this code : [CODE]#include <iostream>// requires for keyboard and screen I/O #include <conio.h> using namespace std; void main () { int frontPad=0; int rearPad=0; int door=0; cout << "Welcome" << endl; cout << " Enter either 0 or 1 for state of the\n Front Pad,\n Rear Pad,\n and … | |
I've heared that its very easy to add c++ code to c++/cli project (net.framework @ Visual Studio 2010) Unfortunatelly I cant do that. I was seraching all over the internet and I cant find any decent examples. All I want to do is to make a function that will read … | |
I'm using Visual Studio 2010 C++ Express and connecting via ODBC to MS SQL Server 2008 R2 Express. My question is: Is there any way I can pass some type of pointer into SqlGetData instead of an actual data type, then stuff that reference into a void pointer for the … | |
hi, could someone help me fix the code for the following question: I need to create a program that determines the animal corresponding to an input year of birth. Assume that the input year is 1900 or later. The 12-year animal cycle is rat, ox, tiger, rabbit, dragon, snake, horse, … | |
Hi, I have a C++ programming assignment and am new to programming. My assignment is to read from an input file into an array of structs but for some reason all im reading in is garbage could really use some advice. If anybody could help thank you. Heres my code … | |
I wrote a program executed it and it returned the expected output i goto modify it to work with multiple input files and now it returns garbage and crashes anyone have any idea? -the output file is commented because i am not using it yet there are no references to … | |
This is the algorithm that I am working from Algorithm Name: UPDATE_CHECKBOOK [B]Problem Input(s):[/B] start_balance - the beginning checkbook balance. xact_amount - the amount of the transaction. xact_type - the type of the transaction (credit or debit). [B]Problem Output(s)[/B]: new_balance -- the ending checkbook balance. Relevant Formula(s): Adding a credit … | |
Hello, i need a little help with this code. it's a header file personal.h [CODE] #include <iostream> #include <fstream> #include <cstring> using namespace std; #ifndef PERSONAL #define PERSONAL class Personal { public: Personal(); Personal (char*,char*,char*,int,long); void writeToFile(fstream&)const; void readFromFile(fstream&); void readKey(); int size() const { return 9 + nameLen + … | |
I want my user to be able to enter a fraction. I could be lazy and just take num and denom separate... But I was wondering if there is way I can allow user to enter a fraction like "3/4". And somehow ignore the '/'. I guess I could take … | |
Hello all, I'm new to programming and I came across the practice problems thread and tried one of the beginner ones: "Make a program that allows the user to input either the radius, diameter, or area of the circle. The program should then calculate the other 2 based on the … | |
I am trying to make a program for class which is circular so it can be used until the user is done. the idea is choose an option then it calls the function, but for some reason it calls the estimate screen even when main_input does not equal 2. I … | |
Hello all , Is there an algorithm for computing Very large numbers (Max 9^1000000) without BigNum ??? Thanks in advanced. | |
could you write a program that process the weekly payroll of the Brooks Leather Company (BLC). For each employee of BLC the program will compute the gross pay, deductions, and net pay. Each week BLC enters the following information into a data file called 'paydata' for all the employees: Social … | |
Hello! I need a little more help. I have managed to convert all my chars input from a text file into digits. Example: Input from file: $1,9,56#%34,9 !4.23#$4,983 Output: 1956 349 423 4983 Now, I need to take those individual digits the 1 9 5 6 and make it read … |
The End.