51,592 Topics

Member Avatar for
Member Avatar for makymakaru

Is pass by value and call by reference the same? I mean i know theres no call by reference in C but there is similarity int he output of the two isn't it? why do we use call by value and pass by value? what are its uses?

Member Avatar for Tom Gunn
0
103
Member Avatar for amit.kumar

Please spot the errors and right the correct code back . Thanks in advance amit kumar[code]#include<stdio.h> #define max 10 typedef struct { char entry[max]; int top; }stack; int stackfull(stack *s) { if(s->top==max) return 0; else return 1; } int stackempty(stack *s) { if(!(s->top=-1)) return 0; else return 1; } void …

Member Avatar for mrnutty
0
110
Member Avatar for killerqb

My code is an expression tree program, in which I make treenodes pointers and push them in the end all into the 1st spot of a stack, in which is declared in my header file of the program. I wipe all the treenode pointers with a recursive traversal. Is this …

Member Avatar for csurfer
0
76
Member Avatar for Damirz

[B]Hello![/B] I am writing a c++ code for displaying a 3D cube. I have some small problems with arrays. I want to initialize just some interval of array. Example: [COLOR="Green"]int array[10][10]=0; //now I want to initialize just an interval array[0][5] TO array[0][8]=1;[/COLOR] ___________ I know that in place where the …

Member Avatar for mrnutty
0
271
Member Avatar for Jennifer84

I wonder something about finding a specific character in a string. What I am trying is to find "*" and if that character is found in the string, I will write "Found" to a file. When running the code below. All this is happening but the same thing is happening …

Member Avatar for dpreznik
0
147
Member Avatar for CPSIT

An International market maker seeks C++ and C# developers to build out proprietary trading applications in both a windows and Linux environment. This firm has been growing steadily over the past couple years and have open development roles on their Market Data, Connectivity, Business Intelligence, GUI, Data Analysis and Speed …

0
47
Member Avatar for leoni

Hi all!! I'm using stl map to store some data here is the example: [CODE] struct MapKey { int i, j; void Set(int pI, int pJ) { //this guarantee that i is always lesser than j if (pI < pJ) { i = pI; j = pJ; } else { …

0
59
Member Avatar for nikhil91

Hello...i m nikhil i m student of comp engg. Nw we are doing work on project..but we hav some problems in it..i request u ..plz help me in my project i send u..my project nmae..plz give me fast reply...m waiting for u r reply.... MY SUBJECT QUESTION IS Que: My …

Member Avatar for matome
-4
74
Member Avatar for Phil++

Hey, I'm trying to do a class for a games program, basically it will allow me to enter games into the class. Here is the code (It won't work) [CODE]#include <iostream> #include <windows.h> using namespace std; class Games { private: char game_title; char game_cost; char name; public: void set_values(char name, …

Member Avatar for dkalita
0
81
Member Avatar for Reprise

My code so far opens a text file in a particular format and reads in the data into a structure called salesRecord. There is no problem there. The problem arises when I write the data to a new binary file. Here is the structure: [code=CPP] struct salesRecord { int custNo; …

Member Avatar for dkalita
0
8K
Member Avatar for NICEGUY123

I need some help passing a array of integers into a hash table by chaining. So if the array is filled it that location it will go to a linked list of the index. any ideas on how to get this done. This is what i have so far. [CODE]chainFunc(int …

Member Avatar for VernonDozier
0
94
Member Avatar for kiranpreddy05

[code=c++]class StripChartWindow : public PegDecoratedWindow { public: StripChartWindow(const PegRect& Rect, const PEGUINT TitleId); virtual ~StripChartWindow() {} virtual PEGINT Message(const PegMessage& Mesg); private: PegStripChart* mpChart; PegStripChart* mpChart2; PEGUBYTE mID; PEGUBYTE mSin; PEGUBYTE mID2; PEGUBYTE mSin2; };[/code] This is the part which is givin me errors as below... error C2143: syntax error …

Member Avatar for kiranpreddy05
0
256
Member Avatar for hodaAgh

I've written a program like the follow: [CODE]int main () { . . . . ifstream file1; ifstream file2; ofstream simiralities; simiralities.open("P(0)_P(1).txt", ios::app); file1.open("test1.txt", ios::in); while (!file1.eof()) { . . . file2.open("test2.txt", ios::in); while (!file2.eof()) { . . . . } file2.close(); } simiralities<<number; file1.close(); simiralities.close(); return 0; }[/CODE] the …

Member Avatar for hodaAgh
0
146
Member Avatar for naej
Member Avatar for NinjaLink

I am currently having problems with my getline in main. Whenever I use it, it prints out the last word in my input file twice. I do not know how to get rid of it. Any help is appreciated. [B]Input file:[/B] noon dog race car cat mom bob [B]Current Output:[/B] …

Member Avatar for NinjaLink
0
100
Member Avatar for kaylalail

I am a student in a computer programming class. I was instructed to write a program that would allow the user to input numbers and the program would output the sum of those numbers. I wrote the program up but keep getting this error message: error C2447: '{' : missing …

Member Avatar for csurfer
0
85
Member Avatar for haven_u

hi there, i just want to know what data type i need inorder to store a binary word eg. 10010111

Member Avatar for vmanes
0
881
Member Avatar for MeBjess

I am having problems completing this program. I have included my notes, and stated current problems in the beginning. Please help. I have no idea what I am doing. This is all I have accomplished in 4 days! I am new to programming, well relatively, it was nearly 17 years …

Member Avatar for MeBjess
1
117
Member Avatar for ross42111

[QUOTE]THe problem is supposed to give the recsive answer and the loop answer. The recusive anwer is always giving 0 - as its answer.and that is inccorrect It is supposed to show the steps and so is the loop answer. Can someone plase help me[/QUOTE] [CODE]#include<iostream> using namespace std; float …

Member Avatar for Lerner
0
148
Member Avatar for martinandrade

I have an assignment due tomorrow and I haven't being able to do it. I do not understand nothing about classes and when to use them. My assignment is: (Account Class) Modify class Account (Fig L 3.1 and Fig L 3.2) to provide a member function called debit that withdraws …

Member Avatar for martinandrade
0
952
Member Avatar for ubuntuubuntu

Hello, I have a program, let's say foo.cpp . If I do "g++ -S foo.cpp". That generates the file "foo.S" with assembly code. I would like to compare the assembly code foo.S with the assembly code generated if I put foo.S in a c program (even though there should be …

Member Avatar for gerard4143
0
355
Member Avatar for Ilija

Hello. I`ve been given to make a program for math.After checking it.. it confuses me.I`ve been searching for a solution about my program.I hope u`ll help me with this program.

Member Avatar for mrnutty
0
65
Member Avatar for osgiedeprof

good day everyone there's something i've been trying to do in c++ its a program that finds the mean median and mode from a group set of data, it should use vectors to read these data from the user and then tabulate into: grade distribution class mark(x) fx i've tried …

Member Avatar for mrnutty
1
106
Member Avatar for daviddoria

I am looking at some open source code and I am a bit confused. There is an Allocator class: [code] class Allocator{ [/code] Then in another class, they have: [code] class Octree{ public: static Allocator<OctNode> Allocator; [/code] When trying to compile, I am getting: [code] error: declaration of 'Allocator<OctNode<NodeData, Real> …

Member Avatar for StuXYZ
0
107
Member Avatar for surfer2009

i am doing a problem . take character dynamic of size 10.when user enter 11th element.it increment the array size to 20. when user enters 21st element array size increases to 30 and so on int main(){ char *p; p=new char []; int size; for(int i=0 ;i<10; ++) cin>>p; size=strlen(p); …

Member Avatar for mrnutty
0
106
Member Avatar for jupitertrooper

Ok, I am newish at programming in c++ and am doing a computer science program in school. For my latest project I have come to a bit of a dead end and was hoping for some help with loops and ignoring characters. The program is quite simple, it is a …

Member Avatar for jupitertrooper
0
132
Member Avatar for Kandeep

#include<stdio.h> main (){ double I; printf ("Enter the value : "); scanf ("%lf",&I); while(I<=0){ printf("**Value must be greater than 0.0\n"); printf("**Try again. : "); scanf ("%lf", &I);} WHAT DO I HAVE TO ENTER HERE? printf(" I is %lf\n", I); }[code]Hi! I create a code so that it checks if the …

Member Avatar for csurfer
0
126
Member Avatar for Massena

First of all I'd like to congratulate you on the excellent community you have here. It is helpful and knowledgeable. I'm looking for a library that would allow me to make a video file (.avi, .mov, any file works) from bitmaps, or other image formats, on the mac. I have …

1
107
Member Avatar for kohkohkoh

i have an assignment to do but i'm still not good at c++programming.. the question is: -------------------------------------------------------------------------- Write a program in C++ that allows users to play the game of Hangman. The program stores a series of words in a file called words.txt, and randomly chooses one word to be …

Member Avatar for C++NO
0
2K
Member Avatar for Sara Sepehri

Hi all! I would like to use microsoft access permissions in my app. how can i do this, i used 'user level security' but when try to connect to DB in my app. Couldn't. Warm regards Sara

Member Avatar for Ancient Dragon
0
22
Member Avatar for cwats124

Even though I am 8 :), I WANT to make an OS. Something to be proud of. I normaly use VB but I am now starting a bit of C++ programming. Thanks , Campbell

Member Avatar for pspwxp fan
-1
134
Member Avatar for Web_Sailor

I am able to build a logic which does exactly how I want it to work but when I add more records there are some problems in flagging. Here is the example:- when my input is : [CODE] mymm.insert(pair<char,int>('a',50)); mymm.insert(pair<char,int>('b',100)); mymm.insert(pair<char,int>('b',150)); mymm.insert(pair<char,int>('b',200)); mymm.insert(pair<char,int>('c',250)); mymm.insert(pair<char,int>('c',300)); mymm.insert(pair<char,int>('d',300));[/CODE] output is correct :- [CODE]single …

Member Avatar for dkalita
0
123
Member Avatar for daviddoria

I am trying to compile some code (Example.cpp from here: [url]http://www.rpi.edu/~doriad/Daniweb/maxflow/[/url]). I am getting [code] Example.cpp:(.text+0x38): undefined reference to `Graph<int, int, int>::Graph(int, int, void (*)(char*))' [/code] This is clearly a template instantiation problem. I see that there is a file called instances.inc that defines the <int,int,int> class, do I need …

Member Avatar for dkalita
0
394
Member Avatar for domenzup

Hi, I have some problems aka how to bring value of type double (or even array of double values) through socket from C++ server to Java applet client. I tried two possibilities. For example: [LIST=1] [*] Doesn't work, but I think it could be ok while working In c++ my …

Member Avatar for domenzup
0
1K
Member Avatar for karen_CSE

Hi, I'm supposed to make a program that asks the user how many integers they want to input, then prompt them to enter those integers. and then I'm supposed to put those integer into ascending order. How do I do that? this is my code so far [code] #include <iostream.h> …

Member Avatar for damz1919
0
173
Member Avatar for yozo

Heya, When I run this code, it spits out the minimum value 200, when I want it to spit out the minimum value from the function. Any pointers? [CODE] #define _CRT_SECURE_NO_DEPRECATE #include <stdio.h> // You can assume no inputs will exceed these values: #define MAX_BOXES 50 #define MAX_PARCELS 50 int …

Member Avatar for dkalita
0
103
Member Avatar for koban_alche

I am trying to make a postfix evaluation and i can't solve the problem about my program. Thanks ahead. here is the C++ Code. [code=c]#include <iostream> #include <string> #include <windows.h> using namespace std; string postfix; int Top, capacity, a; char token; void construct (); bool empty (); void push (char …

Member Avatar for dkalita
0
113
Member Avatar for sonaxi

------------------------------------------------------------------------ Item No. Cost Quantity Amount ------------------------------------------------------------------------ 1 40.00 1 40.00 2 150.00 10 1500.00 3 2000.00 20 40000.00 4 10.00 10 100.00 ---------------------------------------------------------------------- Total 41640.00 i want to print this in c++ help me..i m new in programming...

Member Avatar for dkalita
0
97
Member Avatar for DCV

I have an assignment in which I am supposed to manage a linked list of "players" in a hockey "roster." That's not the issue... problem is, I'm trying to make the function in which a new player is added, and I can't even call it. It results in a LNK2019 …

Member Avatar for dkalita
0
150
Member Avatar for killerqb

I'm creating an expression tree that reads in postfix notation and converts it and prints it out into infix notation. I was wondering how would I go about correctly distributing parentheses and balancing them properly.

Member Avatar for dkalita
0
84
Member Avatar for newbie2c++

Hi all! THis is the program I am supposed to write: Modify the program so it displays a menu allowing the user to select an addition, subtraction, multiplication, or division problem. The final selection on the menu should let the user quit the program. After the user has finished the …

Member Avatar for vmanes
0
900
Member Avatar for Kuroshi

I was trying to make a function to take the square root of a number (which does not work completely, yet), but while I was coding it, I found an strange "error", this is the code: [CODE] #include <iostream> #include <cstdlib> using namespace std; int main() { double number; cin …

Member Avatar for WaltP
0
103
Member Avatar for hoolr

I'm trying to implement a Visitor Pattern in c++, but I'm having problems with the elements being visited in turn having their children visited. For example I have a class Element, which has a vector of Nodes (can be elements or any classes that inherit from node): [CODE] class Element …

Member Avatar for dkalita
0
108
Member Avatar for jdam7459

I'm having trouble getting my dynamic 2d array to work consistantly in my program. Here's the code: [CODE] #include <iostream> #include <string> #include "DisjSet.h" using namespace std; struct cell { bool nWall; bool sWall; bool wWall; bool eWall; }; void CreateMaze(cell** &maze, int x, int y); void LoadMaze(cell** &maze, int …

Member Avatar for dkalita
0
121
Member Avatar for surfer2009
Member Avatar for dkalita
-1
79
Member Avatar for itzaaron

I am trying to write a program that can figure change. Something that might be used in a fast food setting. The Employee is simply prompted to enter the amount to be returned to the costumer and the program would tell how many dollars, quarters, dimes, ect. to be returned. …

Member Avatar for jbennet
0
169
Member Avatar for Fragmad

Hi. I have a class named Product, each object of this class holds one product in a "store". The class also has a static int member to keep track of how many products there are. iProducts is static member. Constructor: [CODE]Product::Product(std::string name, int price, std::string description) { sName = name; …

Member Avatar for vmanes
0
94
Member Avatar for shakunni

So I have to read data from a text file into a [50][50] array and Im not really sure which commands I can use to do that and to write back some data into another file. Would really appreciate some help on this.

Member Avatar for VernonDozier
0
169
Member Avatar for jaycel

write a program that uses a for statement to find the smallest of several integers. Assume that the first value read specifies the number of values remaining and the first number is not one of the intergers to compare.pls help me i need it now!

0
70
Member Avatar for scantraXx-

Hey guys. This is really frustrating because it seems easy but I can't seem to find the correct function to remove this element of my string. [code] void set::display() const // pre : none // post : displays the elements of this set enclosed in braces and // separated by …

Member Avatar for Poincarre
0
158

The End.