49,760 Topics

Member Avatar for
Member Avatar for earlyriser

Hello. I'm having problems filling an array from a text file. I cann't figure out how this works with getline. I can read read and store ALL the lines, but what I'm trying to do is to store ONLY the names of the employees (from the text file) to a …

Member Avatar for earlyriser
0
199
Member Avatar for JRM

Wrestling with more concepts here... Other than the syntax, there doesn't ssem to be much difference between the aggregation and public inheritance. Pretty much they allow the usage of functions from another class-right? One can slightly modify the the inherited function but not the aggregated ones? Why so many ways …

Member Avatar for ~s.o.s~
0
88
Member Avatar for jessiegirl

In need some homework help again. Please I am new at this and PLEASE PLEASE do not post YELLING post at me for wrapping the code because I don't know what that is. If you would like to explain it to me in plain english I am willing to learn. …

Member Avatar for ~s.o.s~
0
95
Member Avatar for teddy13

[code]//This progam accepts marks of 4 different subjects by 5 students. //Then calculates the average score of each subject and displays the result. #include<iostream> using namespace std; //This functions, get the average of each subject. int avrgProg(int PDenis,int PTriza,int PWinnie,int PTeddy,int PJoy); avrgProg= avrgp; avrgp=(PDenis+PTriza+PWinnie+PTeddy+PJoy)/5; return avrgp; int avrgSD(int SDDenis,int …

Member Avatar for may4life
0
83
Member Avatar for mcweezle

So I have been plugging away at this program. I had to create a menu and have 3 sections. Section A asked for a limit, then the user enters that many numbers and it tells them which number was the largest. DONE that. Section C quits the program.. that works …

Member Avatar for WaltP
0
194
Member Avatar for AnG'

Once I completed the following code, compiled.....this is what displayed: Number of 'mild' jars sold. (That's it). Is there something wrong with my C-prompt? Did I miss something? the code is sappose to: [COLOR=#000000]Prompt the user to enter the number of [/COLOR][COLOR=#000000]jars sold for each type. Once this sales data …

Member Avatar for manutd
0
112
Member Avatar for dev.cplusplus

Hi again, I have the following question, I have the following problem: I have an array and a function that receives the array, the problem is that the function is declared like this [code] void MyFunc(int **my_array) { for ( i=0; i<10; i++) (*my_array)[i] = 0; } [/code] And when …

Member Avatar for Ancient Dragon
0
120
Member Avatar for CurtisBridges

Here's a better explantion. Thanks! This part"A" is already finished: A). Create a menu with the following options, (1) Add, (2) Update, (3) Delete, (4) Sort, (5) Print, and (6) Quit. Create an array of 10 strings up to 25 characters long and initialize each one to "none". Each item …

Member Avatar for CurtisBridges
0
99
Member Avatar for wheelz

[code=c] /// // Program; Project2.cpp // Date; // Purpose: // Description: // Input: // Output: // Use: This program is compiled and executed using // Microsoft Visual Studio C++.net 2003 Version 7.1 #include "stdafx.h" #include <iostream> // access input/output stream. #include <string> #include <cctype> using namespace std; int StateNumber(char, char); …

Member Avatar for Ancient Dragon
0
114
Member Avatar for GreenDay2001

I use Visual c++ 6.0 enterprise. However, for few days i am not being able to build any program due to some linker error. I am getting following message, [code] --------------------Configuration: main - Win32 Debug-------------------- Compiling... view.cpp winmaker.cpp control.cpp Linking... LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main Debug/main.exe : …

Member Avatar for Ancient Dragon
0
93
Member Avatar for webspy

I'm developing a simple address book application which displays it's entries in a listview control. The entries are loaded from a file and stored in a array. My problem is I can't find a way to link the listview with the array (assign each item in the listview an ID …

Member Avatar for Ancient Dragon
0
309
Member Avatar for jan1024188

ok here is window [CODE]#include <windows.h> /* Declare Windows procedure */ LRESULT CALLBACK WindowProcedure(HWND, UINT, WPARAM, LPARAM); /* Make the class name into a global variable */ char szClassName[ ] = "jan birsa"; int WINAPI WinMain(HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPSTR lpszArgument, int nFunsterStil) { HWND hwnd; /* This is the …

Member Avatar for jan1024188
0
132
Member Avatar for mattyd

Hello: Something as seemingly simple as an If\ Else statement is causing me much trouble and I cannot figure out where the error lies. I believe it to be in:[LIST] [*]The variable scope [*]The use of the static variable [*]Or, the misplacement of curly brackets (something that has a tendency …

Member Avatar for nanodano
0
233
Member Avatar for CurtisBridges

[COLOR=#008000]//I need to modify this code by changing the sort function to make it recursive [/COLOR] [COLOR=#008000]//and add a recursive binary search that prompts the user to enter a search item.[/COLOR] [COLOR=#008000]//I have added some code for the search, which I will mark with[/COLOR] [COLOR=#008000]// :mrgreen: commented out on previous …

Member Avatar for CurtisBridges
0
80
Member Avatar for CurtisBridges

#[URL="http://www.gidforums.com/showpost.php?p=52405&postcount=13"][B][COLOR=#0000ff]13[/COLOR][/B][/URL] [URL="http://www.gidforums.com/t-12089.html?page=2#"][IMG]http://www.gidforums.com/images/buttons/reputation.gif[/IMG][/URL] [IMG]http://www.gidforums.com/images/statusicon/post_old.gif[/IMG] 10-[URL="http://www.gidforums.com/member.php?u=10954"][COLOR=#8c6239]allican57@yahoo[/COLOR][/URL] [IMG]http://www.gidforums.com/images/statusicon/user_online.gif[/IMG] vbmenu_register("postmenu_52405", true); New Member [IMG]http://www.gidforums.com/images/gid/ranks/rank1_5.gif[/IMG][IMG]http://www.gidforums.com/images/gid/ranks/rank1_5.gif[/IMG] Join Date: Sep 2006 Posts: 21 [IMG]http://www.gidforums.com/images/reputation/reputation_pos.gif[/IMG] Nov-2006, 15:17 I need to modify this code by changing the sort function to make it recursive and add a recursive binary search that prompts the user to enter a search item.I have …

Member Avatar for Salem
0
130
Member Avatar for taruj83

I have this program but need to adjust a little bit. At first it asks to enter an expression but I can only enter it in this form -> 7*(23-2)+10 but i want to enter it like this -> 7 * (23- 2)+ 10; therefore the program should ignore the …

Member Avatar for iamthwee
0
122
Member Avatar for kumarangopi

[COLOR=#000000]Does we need turbo c software to run turbo c exe file?[/COLOR] Hmmm sounds wierd! I wrote a program called chart.c in turbo c which is two header files like bimap.h ,xyz.h.When I compile,chart.exe is created.when i run chart.exe in some other machine, its not running unless tc sofware and …

Member Avatar for kumarangopi
0
166
Member Avatar for astrojith

Well, first of all, I'm astrojith. I'm new here at Daniweb. So, hello all of you :cheesy: !! . Now, to my question. In school, I'm being taught programs which all use "void main()". But, I've seen a lot of code using int main(). I asked my teacher about this …

Member Avatar for chunkmartinez
0
493
Member Avatar for compshooter

I am just trying to print out my array of binary values from 0 to 15. The output I get is wrong, very very wrong. Can someone take a look at my code and enlighten me? [code] #include <iostream> #include <conio.h> using namespace std; int binA[16][4] = { (0,0,0,0),(0,0,0,1),(0,0,1,0),(0,0,1,1), (0,1,0,0),(0,1,0,1),(0,1,1,0),(0,1,1,1), …

Member Avatar for compshooter
0
129
Member Avatar for merck120

I am currently working on a program in C, that needs to calculate the permutations of a n integer array. The approach that I have taken is using recursion, using a n-element array of counters incrementing the correct value each recursion, so the subroutine calls itself x (x being the …

Member Avatar for merck120
0
360
Member Avatar for kararu

A c++ project has to have a web based interface. Anyone pls suggest what languages/frontends are the choices here?

Member Avatar for John A
0
83
Member Avatar for bucsoldier03

i had to make a program that avereage the scores of test grades and displayed the highest grade made and also the lowest grade made and the test average. it also showed the number of vaild scores to. after making the program i have to convert it to C language. …

Member Avatar for pigeonfoot
0
1K
Member Avatar for kipl20

[COLOR=#000000]hi i am a beginner in c++ and have these shapes( in the attached word doc) to do using for the for the first set for loops, the second while loops and the third set do while loops. i already have done the first 2 shapes [/COLOR]with[COLOR=#000000] this code:[/COLOR] [code=C++] …

Member Avatar for ~s.o.s~
0
263
Member Avatar for snedan

I need help with following algorithm: Initaliaze a counter at 2; So long as the counter is less then or equal to number; if the counter divides the number evenly; //<<==problem display the counter; else add one to the counter; ------- so i just cant figure how to check: "if …

Member Avatar for WolfPack
0
103
Member Avatar for newbie2c++

Hi everyone! So I can't seen to get this program to compile and run. THis is exactly what I'm shooting to do: This program should calculate which division in a company had the greatest sales for a quarter. It should use the following functions: [LIST=1] [*]A function should ask the …

Member Avatar for John A
0
189
Member Avatar for Barefootsanders

Hey guys. I have a problem. I have to read in 2 arrays from 1 file. I know how to read in an array with known elements but this time the number of rows/columns are in the file. The first line has the dimensions of the array(rows columns) then the …

Member Avatar for ~s.o.s~
0
110
Member Avatar for bokim
Member Avatar for WaltP
0
130
Member Avatar for confused!

Hello all! I'm having trouble with my homework assignment - I've been working on it for hours and have gotten it down to one syntax error and then I think it will compile so I can move on, I just can't seem to figure out what the problem is. Here …

Member Avatar for Salem
0
97
Member Avatar for toche

Broken from [URL="http://www.daniweb.com/techtalkforums/thread59118.html"]here[/URL]. I Have quite the same probem . But I'm block at this point : [CODE=c] #include<iostream> using std::cout; using std::endl; unsignedint uiStringSize = 0; /* prototype fct encrypt */ void encrypt( char * ); /* prototype fct decrypt */ void decrypt( char * ); char i=0 ; …

Member Avatar for Salem
0
77
Member Avatar for balgarath

I just started messing around with classes and have been trying to figure out this error for an hour or so. Here is the compiler error: [code] g++ player.cpp tictactoe.cpp TicTacToe.h:15: error: expected constructor, destructor, or type conversion before ';' token player.cpp:26: error: 'TicTacToe' has not been declared player.cpp: In …

Member Avatar for Salem
0
149

The End.