49,761 Topics

Member Avatar for
Member Avatar for kdw3

Im trying to create a simple RLC program. Im n ot sure the best way about it, but im trying to to use to 20 character arrays. One to read in the characters to be compressed (buffer) and the other is used to as a check. Either way, the buffer[20] …

Member Avatar for Ancient Dragon
0
270
Member Avatar for TimC

Now that my program is growing in size and I have quiet a few display functions is it possible to put all these display functions in another header file eg. display_functions.h My objective is to clean up my main() file so I dont have to scroll up and down all …

Member Avatar for winbatch
0
258
Member Avatar for TimC

I have 2 functions in my main(). When I call the first function void patient_main_menu(); it will leave me input all the required fields and it also will print to screen EXACTLY what I had inputed originally. When the second function is called void doctor_main_menu(); it SKIPS/ Will not leave …

Member Avatar for TimC
0
226
Member Avatar for iqbal

I am try to write a C++ program that tells the eldest and youngest sibling in a family. i try to write write a member function that overloads the > Operator to sort the Siblings according to their ages after making comparisons.but i am fail. please someone write this. thanks …

Member Avatar for Dave Sinkula
0
240
Member Avatar for pplqingshi007

I want to call a dos command, such as "dir/B *.txt >>a.txt", how can I realize it in C or Fortran code?

Member Avatar for dwks
0
105
Member Avatar for iqbal

I am try to write a C++ program that tells the eldest and youngest sibling in a family. i try to write write a member function that overloads the > Operator to sort the Siblings according to their ages after making comparisons.but i am fail. please someone write this.i need …

Member Avatar for dwks
0
275
Member Avatar for fidelljf

I'm working on a problem where the user inputs the first name, middle name and last name and should produce the output, last name, first name then midde initial. example: input: John Smith Doe output: Doe, John S. the program should also work even if the user does not put …

Member Avatar for Lerner
0
138
Member Avatar for DotNetUser

I'm coding in Visual C++ .NET. I have a managed class(FORM1) that displays a form. .NET framework objects can only be define within function scope. I have a main program that creates an instance of FORM1. I have some callbacks in main that need to access the functions in FORM1, …

Member Avatar for Dave Sinkula
0
62
Member Avatar for kdw3

I am trying to output a string to a file in the form cout << "\" << (an expression) << "\"; however, my compiler won't accept it, i can't get it to output that without there being a space between the slash and the close bracket i.e. "\ ". There …

Member Avatar for server_crash
0
74
Member Avatar for Acidburn

Hello, I've figured out how to transfere a full contents of file into a buffer. Nut now say if i wanted to do: Surname[20]; Firstname[20]; Age and its stored in: user.txt like: Chilver Jackson 25 How would I get the input stream to stop filling the surname up when it …

Member Avatar for Dave Sinkula
0
115
Member Avatar for winbatch

I have developed a set of libraries/common classes that I use in all my apps (this is on unix), and compiled them into a shared object (.so). Then, when I compile my individual apps, I link the library with the executable with -L /libs/ -l mylib . When running any …

Member Avatar for winbatch
0
241
Member Avatar for ToySoldier

Hi everyone... I'm learning arrays and cant figure out why my cout is showing "scattered" output... I'll upload my infile and source code. I'll also upload the example of the correct output my teacher wants us to show on execution. I'm struggling with the "UNKNOWN" State Name listing too. I …

Member Avatar for ToySoldier
0
193
Member Avatar for Keyonts

Hello, I learned about vectors. And when I was debugging my project using vecors I peeked at the vector class member functions and non member functions and I thought wow where did all this come from. Who did this. I understand since im a novice that it can appear intimidating, …

Member Avatar for Dave Sinkula
0
107
Member Avatar for ban26ana

I know you don't do homework for people. But I'm not really sure where else to turn to, because my online tutor for my class isn't really helping. I'll show you the code I have. (I worked about 6 hours on it, honestly. I'm really really bad at this.) If …

Member Avatar for ban26ana
0
271
Member Avatar for bucsoldier03

i have this program trying to read from a file but i keep getting this error message what am i doing i cant figure it out. [code]#include<iostream> #include<cstdlib> #include<cstring> #include"assignment9.h" #include<fstream> using namespace std; const int MAX_LEN = 30; int numofRecords() { int numRecords; cout <<"number of courses to process: …

Member Avatar for dwks
0
106
Member Avatar for Brims

Hiya all ive decided to do my final year project designing an online music video library that will allow multiple access by many users to the same files that will be highly available, with facilities to access the video library by pc, pda and mobile phones. i want to concentrate …

Member Avatar for dwks
0
91
Member Avatar for kdw3

I am trying to create a simple program to read in words from a file, count the words, and output a histogram of word lengths normalised to 1. I am having trouble reading in the words from the file. If anyone could help, it would be greatly appreciated. Regards Kevin

Member Avatar for Dave Sinkula
0
185
Member Avatar for Puckdropper

I'm working on a program where you find any path through a graph. When inputting the graph using an array, I found the number in position[0][8][9] gets set as 1 rather than 0 after position[0][9][1] is read in to memory. I've tried both gcc 3.3.2 and 4.0, and get the …

Member Avatar for Dave Sinkula
0
107
Member Avatar for Keyonts

I have a simple plane object with public datamembers of a flight number and a pointer. I am successfully adding "planes" and deleting "planes," however when I try to move one up a spot, though it compiles well, I seem to get memory crashes. Here is my bump function that …

Member Avatar for WolfPack
0
151
Member Avatar for iqbal

i try to write a program using class that take number of particulars of sibling and take the name and age of each particulars from user and allocated seats. but my program has some error and does not compile and run. my code is: //header files #include<iostream.h> #include<conio.c> //class definition …

Member Avatar for tyczj
0
152
Member Avatar for desertstorm

Hello: I have a question regarding struct when making hash buckets eg. typedef struct _hashNode { void *key; void *value; struct _hashNode *next; } hashNode; let's say when I create the table: hashNode *nodeList = (hashNode *)malloc(sizeof(hashNode) * 200); This is because I want a fixed list size and then …

Member Avatar for Ancient Dragon
0
738
Member Avatar for DotNetUser

This code is written in VC++.NET. I have a windows form that display data from a socket port using callbacks. I have main.cpp that calls Application::Run(new Form1). The socket processing code is currently in the Form's file. I want to separate the Form1 from the socket processing code. Put the …

Member Avatar for perniciosus
0
116
Member Avatar for kahaj

What exactly is the purpose of the scope resolution operator? I can't seem to find anything in my book telling exactly what it does. It just seems to dance around the subject somewhat.

Member Avatar for SpS
0
896
Member Avatar for iqbal

i try to write a project program about stack. i degined In stack.h templates for stack, push and pop, and defined two stack objects one for integer and other for Float in main.cpp to get following types of output, but my but program does not compiles and give error. source …

Member Avatar for SpS
0
121
Member Avatar for TimC

Are there any good tutorials out there that explain adding objects to a single linked list. All I have come across are linked lists involving "structs". regards T

Member Avatar for SpS
0
160
Member Avatar for slobo7x

Hello all. I have a small homework problem to write, and I could use a little help, someone to guide me in the right direction. I need to write a program that asks the user to enter the filename, and then enter the string to search in that file. If …

Member Avatar for perniciosus
0
461
Member Avatar for Cudmore

Hey!! Ahh, all day I've been trying to learn something new, so reading over tutorials I compiled my first socket app!! The only problem is, it isn't working the way I would like it to, and I was hoping you gyus could help me figure out the problems.. I appologize …

Member Avatar for perniciosus
0
215
Member Avatar for some one

Additions to Phase 1 Transactions Each account stores transactions information (the type of transaction (e.g. withdrawal, deposit …etc), the amount, the time of transaction and any additional information you think is important). When any transaction occurs this transaction is recorded in the account. So each account has more than one …

Member Avatar for some one
0
400
Member Avatar for sahil_logic

i do not want to use strcmp() so i made it myself. here is my code: [code]#include<iostream.h> #include<conio.h> #include<stdio.h> int main() { char pass[50]; int strcomp(char pass); cout<<" ENTER THE PASSWORD "; gets(pass); int m=strcomp(pass); if(m==1) cout<<" congrats! correct password "; else cout<<" sorry wrong password "; } int strcomp(char …

Member Avatar for perniciosus
0
397
Member Avatar for Niklas

[code] //Calculator Revision to say error when invalid character #include <iostream> using namespace std; int main() { cout <<"Welcome to the 1.1 calculator by Niklas Kunkel"; cout << "\nPlease enter 2 numbers and press enter after each number"; float num1; float num2; char op; float result; char again = 'y'; …

Member Avatar for Niklas
0
171

The End.