49,761 Topics
| |
My program is compiling fine but my issue is with the output. The grades are not correct and the counters are not working either. If anyone can help that would be great. [CODE]//stud.cxx #include "stud.h" studType::studType(int idVal, float exam1Val, float exam2Val, float exam3Val) //********************************************* { id = idVal; exam1 = … | |
Hello everyone, I just made a .cpp file to modify a data file in .txt (not relevant actually) file. I basically want to apply what this program is doing to all the .txt files in a ./input folder , and I couldn't find anything relevant so far. The code is … | |
Sorry for the newbie question, but I was just wondering if it is possible to program in C++ or some language other than Objective-C on iOS devices? If so, what tools could I use? Visual Studio? Thanks!! :) | |
I am trying to delete the array element that matches with the user input. So I am trying to shift all the cells after the deleted one to the left 1 spot. I know it's still in the loop of the if statement(line 11 and 31) but I can't figure … | |
I need some help my code repeats the add new employee and is not asking for index. What I was supposed to do. Write a function name hireOne whose parameters are the array of structs, and the size of the list; the function should prompt the user to input a … | |
if we do not hav the value of n, then how we input the elements in array from user | |
Hello there guys! :) I've been given a sample code for my upcoming assignment in Computer Graphics and, according to the guide available in the course's site, I've set up Visual Studio 2008. What we've been given is a solution with some sample code which we must use as a … | |
i have 3 files one main.cpp, functions.cpp, and a header.h im using [CODE]#include<fstream>[/CODE] in the main.cpp and in the functions.cpp but im not sure where to define the ofstream datatype in, so that the main.cpp and the function.cpp share the same ofstream variable. where do i put this "ofstream outf;" … | |
Card shuffling and dealing create a program to shuffle and deal a deck of cards,the program should consist of a clas card a class deck of cards and a driver program To deal a card, the driver just prints it out. The dealCard function does not print anything. this is … | |
Good day all, I'm trying to create a template class just for learning purposes. And i keep coming up with two errors... Here's the script: HEADER FILE "lottoclass.h" [CODE] #ifndef LOTTOCLASS_H_INCLUDED #define LOTTOCLASS_H_INCLUDED using namespace std; template<typename T> class Lottery { public: Lottery(); ~Lottery(); T Resize(T* array, int i); void … | |
Program received signal SIGSEGV, Segmentation fault. 0x001c74a5 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) () from /usr/lib/libstdc++.so.6 (gdb) where #0 0x001c74a5 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) () from /usr/lib/libstdc++.so.6 #1 0x0804b444 in Time::getTOD (this=0x0) at Time.cpp:63 #2 0x0804a4f0 in main (argc=2, argv=0xbffff7a4) at printsongs.cpp:102 (gdb) frame 1 #1 0x0804b444 in … | |
Greetings! I have an assignment for my CSE class that requires me to write a program that prints out an isosceles triange made of asterisks. The program reads in the number of rows from the user and prints out a triangle with that amount of rows. The following functions were … | |
I have a program written in C on LINUX environment. I have another wrapper application written in C++ on Windows. I have a DLL of my C code which I cannot change/modify (I also have access to the original source code) but without exports. I cannot modify the original source … | |
Hello everyone, I have a question about the getline() function. I want to read from a text file and add each sentence to a string array, separating them by the full-stop. The getline() function format for input from a text file is different from the one that takes keyboard input. … | |
I need to create a nested map structure of a given depth, in order to keep track of the number of times that a given combination of words occurs in a file for example if the depth is 3, i should have [CODE]map<string, map<string, map<string, int> > > data;[/CODE] and … | |
I am new to c++ and have a question about the while loop. If I have one key condition that is let's say a gamebreaker. Ie money = less than 0, does everything else then go in a big while loopn which may contain many more while loops and if … | |
Hello guys, just wondering why my program crashes when I try to delete a struct from my array. I'm trying to code so that the user searches for a student via a student ID, then opt to delete the searched student's record. I thought I got it right and the … | |
I am having a couple of problems. I think I got the formatting down for the most part. I am having issues in a few calculations and how to iterate through them. Basically I need to take the radius and calculate the circumference and the volume. Once I have the … | |
the question asked me make a program that would find opens an read a txt file and calculate or display the following. - the number of numbers - sum of all the numbers in the file (running total) -average of numbers in file the .txt file just has 100,200,300,400,500,600,700 each … | |
I am doing this assignment for my C++ class, and we have to instantiate 4 objects of the Student class, set the data members and then sort them according to the GPA variable. Ive whittled down the errors to just one, and I am stumped. Here is the error: error … | |
Hello Guys! I need help for an assignment. Somehow my code will not correspond to what I'm looking for. I'm having a hard time to find what the problem is. If you guys can please help me, I'll be more than appreciate !!!!! [I]1) Create a program that will read … | |
I am creating a rock, paper, scissors game (RPS) for my C++ class. I got most of the code working but I can't figure out how to implement the Log and the printLog functions an. I've been working on this assignment for the past 6 hrs and this is the … | |
hello i have my code here and i want to add two numbers together constantly #include <iostream> using namespace std; int main() { int a = 10; int b = 10; cout << a+b; return 0; } how to make A+B add constantly? | |
hi Could someone please help me urgently with my computer programming project. This is the assignment: Create a program in which a user is asked for how many values (s)he wants to enter (maximum 50), then: Asks for the values and stores them into an array of double. Sorts the … | |
I am trying to open a text file in C++. I dont want the file to be open in the console i want to open the file using one of the text editors like gedit. Can someone show me how to open it using gedit and not in the console. … | |
How would one listen for keyboard input, without causing the program to pause waiting for the input? For instance say you have something like [CODE]float num = 0; bool runloop = true; for(int i=0; i<1000000 && runloop; i++{ n += some_time_consuming_transformation(i); // How to listen for input at this point? … | |
//All the c++ files in paste bin //////////////////////////////////////////// [url]http://pastebin.com/AzKPcN3v[/url] [url]http://pastebin.com/FrLpS0CV[/url] [url]http://pastebin.com/f3kYdYFW[/url] [url]http://pastebin.com/26h6yA3k[/url] [url]http://pastebin.com/cieYfDT8[/url] [url]http://pastebin.com/gV0sYb7q[/url] [url]http://pastebin.com/aT2c7bPs[/url] [url]http://pastebin.com/fQrjz3Sh[/url] [url]http://pastebin.com/sR0nrHXj[/url] /////////////////////////////////////////////// Hey, I need some help with this project I can't figure out what is wrong with my code. When I put print statements into the actual functions the output's seem to be … | |
Well its simple: I'making a group of programs that use one file for settings, however not all settings are used for all programs so instead of making another variable is there any way to just throw, let's say the first line to null read the second line feed the third … | |
Greetings! I've been working on this program for the past couple of hours now, and I cant seem to get it right. I'm supposed to write a program that reads in integers from a text file, and then find the sum of the integers. The problem I'm having is with … | |
Hi folks, I had created a class for student. This is the class. [code] class student { int rollno,marks; char name[20]; public: void show(); void get(); int filecreate(const string &,fstream &); int fileopen(const string &,fstream &); static int add(const student &,fstream &); static int read(const student &,fstream &,int); static int … |
The End.