49,757 Topics
| |
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 … | |
Hi, I'm doing a client/server with threads instead of forks. The goal is to have multiple clients connect to the server and for each client the server makes a new thread. Although it's working atm, there are things that bother me, especially the sockets. The first thing I want to … | |
Hey, I'm going to college to major in computer programming. Will what I learn in college, in any way, help me to write my own programming language and make my own compiler? If not, where could I acquire the information? | |
Here is my code: #include <fstream> #include <iomanip> #include <cmath> using namespace std; int main() { char fare; char choice='Y'; int hrIn, minIn, hrOut, minOut; int hours; int minutes; int total_minutes; double cost; float charge; float additionalTime; while(choice=='Y'||choice=='y') { cout << "\nThis program will calculate a single, couple, or group … | |
I need immediate help here. Please help me! :) I just can't figure out why my program is crashing while executing it. The compiling of the program is fine. (no syntax errors) I used Dev C++ 4.9 for this version. [QUOTE][CODE] #include <iostream> #include <conio.h> #include <iomanip> #include <string> using … | |
i would never ask for debugging help usually but i am totally lost and have wasted far too much time on this. both peices of code compile correctly. the original function works fine with my program and the second one crashes. the original code checks a textfile in the root … |
The End.