49,761 Topics
| |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
why does everyone gets so heated up..when it comes to turbo C++ compiler...can someone give me reasons | |
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 | |
[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 … | |
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 + … | |
: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 … | |
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 … | |
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] == "(" … | |
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, … | |
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 … | |
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 … | |
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 … | |
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 … | |
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. … | |
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. | |
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 … | |
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 … | |
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 … | |
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 … | |
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(); … | |
Can we find the smallest of three integers, without using any of the comparison operators....logic please | |
[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 … | |
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 … | |
as new throws exception bad_alloc...does malloc also throws exception of some kind??? | |
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 … | |
Is const void* p the same as a null pointer? Why would i use it? |
The End.