49,761 Topics
| |
Trying to write to a file with this function in my program, for some reason itl make the file, it'l output the text on screen, it all works as intended, but i go to check on the file, and its blank inside. so im guessing im doin somethin dumb, help/tips … | |
Hello members of Daniweb :) I am a frosh IT student and I need little help with this :) ok so the program is basically a simple cashier program. you enter a code for an item. you buy it compute for the change etc. etc. now my problem is with … | |
I have a file with a list of names. Jane Huston Bob Brown Jack Tracy they should be ordered by last line like this Bob Brown Jane Huston Jack Tracy but my program wont compile and i dont know how to fix it? here is my code #include <iostream> #include … | |
I'm getting weird output from this program, its printing a bunch of huge negative numbers, they're all the same number in fact. I have no idea what's wrong with it. Heres what im trying to do: I'm taking ordered pairs and translating it into a boolean matrix so for example … | |
Ive been working on this code for a bit but cant figure out what im doing wrong, If someone could have a look Id appreciate it a lot. Thanks! heres what its suppose to do: Write a function that displays the left margin of the screen a solid square of … | |
I need help making this program setup in a way my professor wants it. I did the program and it works fine I have to add the percentage correct that I will finish after I try to set it up correctly. the files are attached below. biggest issue is understanding … | |
following is my main program Linklist is a class of circular Linked list so my question is since the parameter of function doesn't contain Linklist in it can I go ahead and call it "List" in any function, such as List.print(), anyway? [CODE]main() { linklist list; int choice, num; do … | |
I'm creating a Wheel of Fortune program, and I have just started. Currently I'm just trying to take a word from a file and transfer it into an array, and with that create an array with the same size, but full of asterisks (*'s). My class is making me use … | |
Having problems with executing jobs using fork. The code is supposed to create one job and execute one job and repeat this multiple times. We are only supposed to use usleep in the jobgeneration() function. We are having trouble sleeping and executing ctrl-c in the execute job function. [CODE] #include … | |
I think I am only making this worse and worse... I need to write a program that uses functions and a for loop to calculate a hat size, (`2.9*weight in pounds/height in inches`), jacket size (`height in inches*weight/288`), and waist size (weight in pounds divided by 4.9)... I know this … | |
i have a sign up programme in c++, like that of facebook . and i want a code to change password for a user, in that app which i have made please give me fully written code. i am in trouble it is my assignment of college. | |
I want to know how to make a plugin framework in c++. I have searched for some topics and have found a few to get me started but I still don't understand the concept. I'm making an IDE and would like to add the functionality of plugins...I know you have … | |
Hello guys im been tasked to do a series of complex functions. so far im able to complete addition, subtraction and multiplication, but currently stuck at division. Would appreciate any kind soul help on this [code] class Complex { public: Complex( double r, double i ) : re(r), im(i) {} … | |
Hi All, this is my first query after joining the forum. I would like to know following points: 1. If I can create threads in constructor 2. If yes, can I use the same object / instance (which created this thread)in this thread to call other methods of the class … | |
hello: Is there a method for using and saving your work on a usb stick. I tend to use multiple PC's all using VS. Is there a way to use this method? | |
Can someone help me on this? While considering the following function definition: [CODE]void defaultParam(int u, int v = 5, double z = 3.2) { int a; u = u + static_cast<int>(2 * v + z); a = u + v * z; cout << "a = " << a << … | |
Hello! So for my assignment I had to declare an array of 25 student objects and input data into them including another array of 5 test scores. All that is done and works flawlessly(At least that's what I think), but the last portion of the assignment is for me to … | |
how to connect multiple clients to a single server....??? i hv a server and a client connected to each othr. and sending and receving data. through tcp/ip proto. now i want to make connections with other clients also. plz help me.. | |
easy program... but x_1 and x_2 strings dont change after return from function I expect 50 and 70 but still keeps declaration value. [CODE]#include <cstdlib> #include <iostream> using namespace std; void absurd (string a, string b) { a="50"; b="70"; } int main(int argc, char *argv[]) { string x_1="burcin"; string x_2="erek"; … | |
Hello everyone. Is it possible to read two lines of a file in one iteration based on some condition? The files has several blocks of data where each block contains two consecutive lines having ORDER ID in it. I want to store each of these IDs for each block of … | |
hi everyone = ) i wrote program using C++ it's for type a small letter then it will print it back in a capital letter using file processing i wrote the letters in txt file in the same c++ folder like this way a A b B c B and … | |
Dear all, I am new to this and I need ur help. I have the following problem description Write a C++ program that defines 3 arrays of integers a, b, c and 3 integers counts cnt_a, cnt_b , cnt_c. The program must then ask the user for the number of … | |
Hi everybody. As of now, my server will accept clients in a loop, and will pass those clients off into a new windows thread. Inside the thread, the server will be able to receive any data each client may send. When a client connects, the clientsConnected variable increments. So when … | |
here is my question say I have a struct nodetype in the header file named linklist.h there contains a struct constructor in the nodetype named nodetype(int, nodetype*) how to I declare the code in the linklist.cpp? do I do the same for class constructor or something different? | |
Okay, I have a header file I am trying to stub out to my_list.cpp but I keep getting these errors that I do not understand and have been working down to them but I got stuck. I figure I'm in deep trouble seeing as I can hardly stub these out, … | |
How can i make addition in my linked lists if the nodes are stroing two values: 1) int element 2) int colomnvalue i have to make the addition on the basis that the nodes having the same colomvalue, thier element should be added. This addition is to be made in … | |
This compiles with no problem, but my calcCost function returns jibberish. I’ve tried many different combinations and I know it’s something simple. If I change my calcCost function to void and cout totalCost, it works fine, But I need the return value for another class (Order) that I need to … | |
I am trying to create a program to log the medal tally of the cwg. However,I'm still getting wind of using binary files. It seems as if nothing is being read from or written into them. Below is my entire code. It would be of help if somone could direct … | |
This is the Header file [CODE]#ifndef STUDENT_H #define STUDENT_H // class Student definition class Student { public: Student( char *nPtr ); ~Student(); void displayGrades() const; Student addGrade( int ); static int getNumStudents(); private: int *grades; char *name; int numGrades; int idNum; static int numStudents; }; // end class Student #endif … | |
Hi, Im trying code something which will launch an executable file. I have tried system("example") but the only problem is that the file which has been launched has to be closed before the rest of the code is executed. Does anyone have an alternative to this method? |
The End.