49,764 Topics

Member Avatar for
Member Avatar for majyun

Hi there, I am new to the forum. I know this topic is not new. I have did a search on it and did not quite get what I wanted. Currently, I am trying to write a c++ programme which help me to read in about 10000 rows of numerical …

Member Avatar for jonsca
0
228
Member Avatar for xcarbonx

Hi..i'm having some trouble coming up with the an algorithm for a problem im working on. I am trying to check an arithmetic infix expression like: (((6+2)/2)*(3-1)); //This is my input file(; marks end of line.) I have to check to see if the statement is ok, or not ok, …

Member Avatar for L7Sqr
0
94
Member Avatar for jkoske

Right now I am using gdb on command line in Ubuntu. It seems pretty inefficient and cumbersome. Is that just because of the learning curve or because it is really that way? Do "real" c++ programmers use gdb? I felt the same way about vi until I learned to use …

Member Avatar for Stefano Mtangoo
0
109
Member Avatar for KazenoZ

Hello, I'm having this problem with the transparency in GDI+. I have 2 pictureBoxes, one over the other, and one of them has their alpha color set to magenta(255, 0, 255). My goal is that when the upper pictureBox has a picture on it with a section of the magenta …

Member Avatar for KazenoZ
0
135
Member Avatar for benny2010

Hey im creating a cache simulation in C++ i have the read/write policies and most of the eviction policies but im struggling to get my head round adaptive replacement cache. i kind of understand how the two lists work but not very well. If anyone could help explain it to …

0
86
Member Avatar for TheLittleEngine

The parts I am having trouble with are: The private section of the class should also include two member functions that will a) reduce a fraction to lowest terms b) normalize a fraction (the only sign appearing will be a negative sign in the numerator.) for part a) I have …

Member Avatar for TheLittleEngine
0
724
Member Avatar for er.shalini10

hi, i wanna know the program for the query given below. i will be thankful to u. query: Seat Reservation prog for the theatre. Write a function for seat allocation for the movie tickets. Total no of seats available are 200. 20 in each row. Each row is referred by …

Member Avatar for elsiekins
-10
999
Member Avatar for eduard77

I just learned c++ and is very hard for me to put in practice what I learned. So, I would like to know if anybody could help me by giving me tasks and helping me to solve them. Thanks

Member Avatar for eduard77
0
256
Member Avatar for ManCard67

To be honest, i'm really bad with c++ but it's required for my major. We have to make a sudoku program, that reads from a file, inputs the data into a 9 by 9 grid (of 2d array), inputs numbers till the grid is solved, then check for valid moves, …

Member Avatar for Sky Diploma
0
336
Member Avatar for joeyn

Good day! can you guys help me to have the code for this output? pleasee.. _ _ _ 1 _ _ 2 2 _ 3 3 3 4 4 4 4 thanks in advance!

Member Avatar for Akill10
0
126
Member Avatar for VasquezPL

Hi! I have a problem. I cannot pass text chosen in combox to text field.. The problem is: how to do that if all menu items from combobox are read from cfg file. ComboBox: [code] // // systemBOX // this->systemBOX->FormattingEnabled = true; resources->ApplyResources(this->systemBOX, L"systemBOX"); this->systemBOX->Name = L"systemBOX"; StreamReader^ plik= gcnew …

Member Avatar for VasquezPL
0
686
Member Avatar for lwb525

Here is the problem from my Programming class: Write a program that asks the user for two file names. The first file will be opened for input and the second file will be opened for output. (it will be assumed that the first file contains sentences that end with a …

Member Avatar for WaltP
0
2K
Member Avatar for Jutch

I am trying to compile a my code for a GUI project and for some reason it's giving me fatal error c1075. I'll post the code and output message. Let me know what it wants me to do. There is only one set of braces so I don't know what …

Member Avatar for jonsca
0
218
Member Avatar for biancaW

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 …

Member Avatar for WaltP
-1
84
Member Avatar for cppnewb

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 …

0
64
Member Avatar for jwill222

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 …

Member Avatar for frogboy77
0
263
Member Avatar for Zgentry

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 …

Member Avatar for Zgentry
0
142
Member Avatar for lochnessmonster

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?

Member Avatar for L7Sqr
0
998
Member Avatar for packluv12

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 …

Member Avatar for jkoske
0
118
Member Avatar for assembly_11

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.

Member Avatar for jkoske
0
77
Member Avatar for theoryforlife

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 …

Member Avatar for theoryforlife
0
249
Member Avatar for jugadengg

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 …

Member Avatar for gerard4143
0
227
Member Avatar for ntrncx

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 …

Member Avatar for VernonDozier
0
466
Member Avatar for lochnessmonster

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]

Member Avatar for mrnutty
0
109
Member Avatar for lovely girl
Member Avatar for Mahesha999

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; …

Member Avatar for arkoenig
0
277
Member Avatar for jeevsmyd

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 …

Member Avatar for rxlim
0
331
Member Avatar for MuaazKhalid

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 :-/

Member Avatar for Narue
-1
130
Member Avatar for SourabhT

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

Member Avatar for ziggystarman
0
116
Member Avatar for biancaW

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 …

Member Avatar for vinayakgarg
0
151
Member Avatar for VasquezPL

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 …

Member Avatar for VasquezPL
0
1K
Member Avatar for AFinger

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 …

Member Avatar for AFinger
0
180
Member Avatar for biancaW

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, …

Member Avatar for rxlim
0
741
Member Avatar for hotwheels92

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 …

Member Avatar for jonsca
0
170
Member Avatar for alex55

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 …

Member Avatar for alex55
0
166
Member Avatar for rbduck09

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 …

Member Avatar for rbduck09
0
145
Member Avatar for zhinokin

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 + …

Member Avatar for zhinokin
0
604
Member Avatar for rickster11

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 …

Member Avatar for vijayan121
0
121
Member Avatar for doublecheck

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 …

Member Avatar for doublecheck
0
157
Member Avatar for enkidu75

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 …

Member Avatar for peter_budo
0
109
Member Avatar for medopunsher

Hello all , Is there an algorithm for computing Very large numbers (Max 9^1000000) without BigNum ??? Thanks in advanced.

Member Avatar for arkoenig
0
109
Member Avatar for biancaW

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 …

Member Avatar for arkoenig
-3
101
Member Avatar for andimiami

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 …

Member Avatar for mrnutty
0
209
Member Avatar for Swiftle

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 …

0
57
Member Avatar for <Tech>

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?

Member Avatar for gerard4143
0
82
Member Avatar for plang007

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 …

Member Avatar for Software guy
0
192
Member Avatar for jember

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 …

Member Avatar for jember
0
159
Member Avatar for lexusdominus

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 …

Member Avatar for lexusdominus
0
319
Member Avatar for fpsasm

Hello, I am writing a section of c++. Here is the section that does not work: [code=c] int a, escape; double temp1,temp2; escape = 0; a = 0; while(escape < 2){ Complex c[a]; cout << "Please input a complex number, the real part follwed by the imaginary part.\n"; if(!(cin >> …

Member Avatar for fpsasm
0
115
Member Avatar for blee93

Hi, I wrote this code for C++ Primer Plus, but I don't really get why it doesn't work. [CODE]#include <iostream> #include <cctype> using namespace std; int main() { char ch; string str; int vowels = 0; int consonants = 0; int others = 0; cout << "Enter words (q to …

Member Avatar for Red Goose
0
226

The End.