49,761 Topics

Member Avatar for
Member Avatar for globberbob

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 …

Member Avatar for globberbob
0
134
Member Avatar for whodoes21

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 …

Member Avatar for whodoes21
0
201
Member Avatar for ConfusedStudent

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 …

Member Avatar for VernonDozier
0
302
Member Avatar for rebellion346

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 …

Member Avatar for rebellion346
0
153
Member Avatar for hq1

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 …

Member Avatar for Taywin
0
122
Member Avatar for eagles39

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 …

0
74
Member Avatar for bigwhiteegg

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 …

Member Avatar for Taywin
0
156
Member Avatar for gmfreak1991

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 …

Member Avatar for gmfreak1991
0
517
Member Avatar for lotrsimp12345

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 …

Member Avatar for lotrsimp12345
0
508
Member Avatar for andimiami

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 …

Member Avatar for sfuo
0
174
Member Avatar for harshalpagare

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.

Member Avatar for SgtMe
-2
90
Member Avatar for Akatosh

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 …

Member Avatar for Stefano Mtangoo
0
216
Member Avatar for watery87

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) {} …

Member Avatar for mrnutty
0
211
Member Avatar for geethasree

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 …

Member Avatar for geethasree
0
2K
Member Avatar for georgy9002

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?

Member Avatar for daviddoria
0
65
Member Avatar for baconswife

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 << …

Member Avatar for arkoenig
0
129
Member Avatar for Syrne

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 …

Member Avatar for Syrne
0
1K
Member Avatar for simply_viks

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..

Member Avatar for Ancient Dragon
0
148
Member Avatar for burcin erek

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"; …

Member Avatar for Fbody
0
113
Member Avatar for heidik

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 …

0
88
Member Avatar for M a H a

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 …

Member Avatar for Fbody
0
376
Member Avatar for mbouster

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 …

Member Avatar for mbouster
0
108
Member Avatar for BlackPhoenix

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 …

Member Avatar for simply_viks
0
358
Member Avatar for bigwhiteegg

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?

Member Avatar for bigwhiteegg
0
77
Member Avatar for blackrandom

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, …

Member Avatar for blackrandom
-1
208
Member Avatar for sairakhalid

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 …

Member Avatar for Taywin
0
162
Member Avatar for cbsinc

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 …

Member Avatar for Taywin
0
114
Member Avatar for Shijo Jose

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 …

Member Avatar for Taywin
0
199
Member Avatar for manofhouse

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 …

Member Avatar for thelamb
0
377
Member Avatar for marvolo1300

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?

Member Avatar for Stefano Mtangoo
0
208

The End.