49,761 Topics

Member Avatar for
Member Avatar for ToySoldier

Hi... thru trial & error.. I managed to get my homework program to compile. However I'm pretty sure I did it the long way :-| . **Can someone give me a direction to make it easier?** Brand new to C++ so bear with me. I have enough to make the …

Member Avatar for ToySoldier
0
174
Member Avatar for btech

the assignment i am working on ask to write a function that uses a loop to find the sum of the squares of all integers between 1 and n. then asks "what is the order of your functions?" my question, which may be obvious is what is n? and what …

Member Avatar for Dave Sinkula
0
154
Member Avatar for UriahDragon

i'm supposed to use nested for loops to estimate the value of e and display the estimation through each run. this is what i got so far, but i found out im not supposed to use setprecision so i've done it wrong but don't know what to do to fix …

Member Avatar for CrazyDieter
0
117
Member Avatar for jahowell01

This code is supposed to determine a salesperson's gross pay for last week, calculate and display thier earnings. The salesperson each receive $200 per week plus 9 percent of thier gross sales. The output should display like this: Enter sales in dollars (-1 to end): Salary is: $650.00 Enter sales …

Member Avatar for ITgeneration
0
135
Member Avatar for madt

program does not return the value entered #include <iostream> using namespace std; class testClass { public: int sum(); void print() const; testClass(); testClass(int a, int b); private: int x; int y; }; int testClass::sum() { int c; c = x + y; return c; } void testClass::print() const { cout …

Member Avatar for madt
0
141
Member Avatar for SpS

why does everyone gets so heated up..when it comes to turbo C++ compiler...can someone give me reasons

Member Avatar for Rashakil Fol
0
169
Member Avatar for steveaustin

i need in c++ for running in a compiler this 1 12 123 1234 12345 123456 and another c++ file 654321 54321 4321 321 21 1 everyone can help me i need a code for running in c++.net i need exactly in the output

Member Avatar for Narue
0
126
Member Avatar for compshooter

[FONT=Comic Sans MS]Hello evreryone, I want to start by saying I did use the search function and I did read the fstream tutorial. But I didn't see the answer I need. I have been given a text file for which I need to read input from. Here is a partial …

Member Avatar for bobobobo51
0
2K
Member Avatar for kahaj

Hello. I'm pretty new to the world of C++. I'm trying to write a program that shows the pay of different levels of employees: managers -code 1- are on salary hourlies -code 2- get str8time for 40 hours, then time & a half commission -code 3- base of $250 + …

Member Avatar for kahaj
0
302
Member Avatar for Joaquine

:rolleyes: Hi. I'm new to this forum and well I'm also new to the programming languages. :) and im taking some programming classes c++) i need help with a program that im working on... I have tried for about two days to see what is the problem but i just …

Member Avatar for Joaquine
0
137
Member Avatar for mister-fett

A few of my friends from computer science, led by me, are developing a MUD game. I plan to run the server from home, and we plan to write the game in two source files. (Yes, we are determined to do this from scratch, without Lima or Mudscript.) The first …

Member Avatar for Drowzee
0
224
Member Avatar for superservo15

I'm having type problems... if anyone could help that'd be great. Also, I haven't coded in c++ for 2 years.. very rusty :) Ok, I have the following dynamic char array and code [CODE] char* term1; term1 = "f(x)"; //i really have a loop here... if ( term1[1] == "(" …

Member Avatar for ITgeneration
0
151
Member Avatar for john233

Hello, I am doing a assignment for my class. My assignment is tying to tell how much book subscriptions sold. Here is the code: [code] // This program find out how much each subscriptions cost #include <iostream> #include <iomanip> using namespace std; int main() { float A, A1, B, B1, …

Member Avatar for Stoned_coder
0
93
Member Avatar for DotNetUser

I'm using Visual C++.NET. When the user clicked on the X in the upper right corner of my gui, I want to close my files and sockets before the gui terminates. Which form event would get triggered when the X is clicked? I don't know where to find the list …

Member Avatar for BountyX
0
133
Member Avatar for Vladvaga

I need to write a program in C++ that will compute numeric grades for a course. The course records are in a file that will serve as the input file.Each line will have a last name, first name, ten quizes all on one line... you should calculate the average and …

Member Avatar for Vladvaga
0
140
Member Avatar for Elthran

I just downloaded Dev-C++ and tried typing code. My first test was #include <iostream> using namespace std; int main() { cout << "Enter height in centimeters: "; int centimeters; cin >> centimeters; cout << "Your height in feet " << centimeters << endl; return 0; } But I have discovered …

Member Avatar for ITgeneration
0
944
Member Avatar for shahid

Note:- There are three files that will work by combining in a project. Most of the code for the Tokenizer class is already provided. You are to complete the routine Tokenizer::getTokens. The routine currently handles single entry, single range start and single range end. Your job is to the put …

Member Avatar for Rashakil Fol
0
97
Member Avatar for vartotojas

So my problem is that my function isn't working properly. I realize that this is not efficient but I need it done in one fucntion. It is supposed to be a function that draws a room and lets you walk around in it using the arrow keys in console mode. …

0
71
Member Avatar for DotNetUser

Is there a way to output data to a log file in ascii rather than binary? The example in my book only output data in binary. I want to create a log file that logs error messages that I can use to debug my code. Thanks.

Member Avatar for Stoned_coder
0
108
Member Avatar for vartotojas

I know how to use C++ to recieve input via [CODE]cin >> x;[/CODE] But now I want a way to constantly check for input without pressing enter. To my knowledge with cin you must press enter to assign whatever they typed to a variable. How could I make it so …

Member Avatar for vartotojas
0
120
Member Avatar for heavyc

i have this program and i need to count how many times each number is repeated and then delete the repeated i dont how to count them and then delete them can someone help?? [code]#include <iostream> using namespace std; struct node { int item; node *next; }; struct node *push_front …

Member Avatar for Narue
0
123
Member Avatar for heavyc

if i have a node that had a different number everytime and i want to delete only the nodes that are repeated(which has random numbers in them) and how would i count them to see how many of each i would have. can i use if statements to count the …

Member Avatar for Narue
0
276
Member Avatar for stupidenator

Hi everyone, I am trying to write a program for a class but I cannot seem to figure out how I can convert a date in the format mm/dd/yyyy to separate int values. I.E. m+m+d+d+y+y+y+y. I've got the rest of the program written, but I cannot seem to figure this …

Member Avatar for stupidenator
0
192
Member Avatar for server_crash

I'm trying to create a Mammal class which has two virtual methods, and one non virtual methods to demonstrate inheritance. I've written the class, but now I have a few errors, and a few questions. First of all, I'm recieving an error that says the following methods aren't declared: speak(); …

Member Avatar for CrazyDieter
0
131
Member Avatar for SpS

Can we find the smallest of three integers, without using any of the comparison operators....logic please

Member Avatar for SpS
0
315
Member Avatar for SpS

[QUOTE=narue]Well, you didn't specify how it didn't work, but on one of my compilers, there's a run-time assertion if the allocation size exceeds a certain limit, and 4294967295 is beyond that limit. Such an assertion throws up a dialog box and aborts the program, which could look like an uncaught …

Member Avatar for SpS
0
124
Member Avatar for heavyc

I was wondering if anyone can help me with linked lists??? I have to create a linked list with 10 random numbers rangeing from 1-5 and insert them into a node in the appriote postion of a linearly linked list and display the number of times each number of occurences …

Member Avatar for Narue
0
315
Member Avatar for SpS

as new throws exception bad_alloc...does malloc also throws exception of some kind???

Member Avatar for Narue
0
555
Member Avatar for smagee12

Hello, i am just starting to learn c++. Ane hints or tips would be appreciated. I have a text file that looks something like this 2 fred hind 6 julie frie Now, i need to take that number, set it to an element of the array, then store the name …

Member Avatar for smagee12
0
166
Member Avatar for bumsfeld
Member Avatar for Ancient Dragon
0
235

The End.