49,761 Topics

Member Avatar for
Member Avatar for opposition

could someone please show me how i would be able to reverse the printout of a linked list?, i have gotten it to print out in the right order but not sure how to make to printout in reverse. here is my current code, [CODE] void print(node*& head) { node* …

Member Avatar for opposition
0
82
Member Avatar for sauna

[code=cplusplus] #include<stdio.h> #include<math.h> #define max 100 double f(double y); int k, i; double y[max]; double x[max]; void copyarray(double[], double[]); main() { FILE *file; double h, x, y; printf("this program does a first order ODE for dy/dx=-y+1 with initial condition of y(0)=0 from x=0 to x=0.9\n"); printf("input the step size (h>0):\n"); …

Member Avatar for ArkM
0
107
Member Avatar for the universe

Hello, Does anybody know how to write a command to generate a random array (let's say with 100 numbers) that contains numbers from a function that goes like y = x exp (2.5). where the range of x is given. I hope that my question is understandable :-) Thank you,

Member Avatar for VernonDozier
0
142
Member Avatar for skatamatic

Ok, so I'm trying to prove to my teacher that Div and Mod isn't always the best way to solve things. So i created this tiny program, held entirely in main.cpp : [CODE=cplusplus] //Project: Mod_Efficiency //Author : Kyle Wesley //Descrip: This was made to prove that mod/div operations are often …

Member Avatar for skatamatic
0
3K
Member Avatar for AwesomeLord

I am writing a small program in C++ and I need some help. [code] #include "iostream" #include "string.h" using namespace std; void main(){ string sman; cout << "Are you there? \n \n"; cin >> sman; if(sman == "yes" || sman == "Yes"){ cout << "Screw that! \n \n"; main(); } …

Member Avatar for MelechM
0
78
Member Avatar for Jennifer84

I have a listBox control [I](Not listView1 as written in the Subject). [/I] I am searching for an event for this control that can notice if an item is either added or removed. I tried "ControlAdded", "ControlRemoved" but this did not seem to be the one. I am not sure …

0
57
Member Avatar for SVR

Im calling a function in a 3rd party dll. Somewhere down the line it hits an access violation (0xC0000005). I wrapped the call in a try/catch but it never catches and the runtime pops up the old Unhandled Exception. This call is several calls deep in my code so I …

Member Avatar for SVR
0
190
Member Avatar for iamthwee

Ok let's say I have a text file: [code] (0,0) = 1.0 (0,1) = 2.0 (0,2) = 3.0 (1,0) = g (1,2) = 2.0 (2,2) = hi there (2,[COLOR="Red"]8[/COLOR]) = ee (5,4) = e (10,1) = g [/code] Where the each part of the line is delimited by a tab. …

Member Avatar for iamthwee
0
257
Member Avatar for chic

I have to convert this into OOP style. How will I start? [code=C++] #include<stdio.h> #include<stdlib.h> #include<string.h> #include<conio.h> #include<ctype.h> #include<dos.h> #include<graphics.h> #define true 1 #define false 0 void disp(); void printmenu(); void intro(); void levelmenu(); void easy(); void initial(int x); void draw(int x, int y, int i); void userwin(int no); int …

Member Avatar for VernonDozier
0
89
Member Avatar for jhonnyboy

hello guys i got a simple project but not that simple at the same time. lol The user needs to input a number such as : 512 and the code needs to output the number but in letters(five hundread and twelve). Any tips? :)

Member Avatar for Nick Evan
0
141
Member Avatar for ravenous

Hi, this might be a quick question, if anyone "just knows" the answers. I want to know a little about the differences between lists and vectors. For example, I think that the elements of a vector are stored in continuous blocks of memory (Maybe?) Are lists stored the same way, …

Member Avatar for ravenous
0
103
Member Avatar for opposition

Hey, Im having some trouble with linked lists, I have been givin a task where I am asked to crreate a linked list which reads in a random set of chars from a .txt file and stores them in a linked list, then prints them out in a seperate function. …

Member Avatar for opposition
0
108
Member Avatar for AutoC

I need to code a linked binary min heap.Everywhere I go its an array based min heap..can someone direct me to some pseudocode for a linked min heap? Thanks for any help

Member Avatar for ArkM
0
113
Member Avatar for Spartan552

Hello, I would like to know what you think about using XML files in order to exchange informations between different processes. I know this may not be the fastest solution but Il still think It can be very effective. What do you think about that ? Advantages and cons of …

Member Avatar for ArkM
0
80
Member Avatar for Falkoner1

Hey, I was wondering what is the most popular/best network library for free download. I guess I should give my situation, as that might decide which is best for me. Basically, I want the ability for 2 or more players on different computers, on the same LAN, to be able …

Member Avatar for gusano79
0
137
Member Avatar for woody292

Hello All. I am currently working on a project that introduces us to recursion and was needing some help with my program. This is early code so i know many things aren't correct. [code] #include <iostream> #include <fstream> using namespace std; int str_length(const char[] str); int str_compare(const char[] str1, const …

Member Avatar for VernonDozier
0
111
Member Avatar for grisha83

Hello everyone, Could you please explain to me how to write the user defined functions with multiple arguments? (specifically with 2 or 3 input arguments). And also, how to make one function to manipulate different data each time it is called? (for example area of bigger circle minus area of …

Member Avatar for grisha83
0
147
Member Avatar for ryukifaiz

Can someone help me on how to write the program? The details i already upload.See the attachment.The due date is tomorrow,i hope someone can help me.Thanks!

Member Avatar for Alex Edwards
0
86
Member Avatar for icecube0045

Hi everyone. I have a homework assignment to create a program with a sales reciept. I have done pretty good so far but my only problem is I cant figure out why the cash interger isnt working. The code is suppose to subtract the cash recieved from the customer which …

Member Avatar for icecube0045
0
109
Member Avatar for Frederick2

I have not been able to obtain an answer to this question anywhere (including here) so I’ll ask it again. I can understand that folks don’t want to wade through hundreds of lines of code looking for someone else’s bug, so I’ve worked very hard to produce the very smallest …

Member Avatar for Frederick2
0
1K
Member Avatar for sunveer

could anybody tell me how to sum the sequence given using loops instead of using any other function of c++? 1 + 1/1! + 1/2! + 1/3! + .....1/n!

Member Avatar for ArkM
0
115
Member Avatar for acoxia

Hello (sorry if i break any rules on post format first time on daniweb)Have a project to make a binary to hex,Dec,octal. Now i found this code here [url]http://www.daniweb.com/forums/post598839.html#post598839[/url] and made a few changes to it but i am not familiar with a few of the parts and some help …

Member Avatar for acoxia
1
82
Member Avatar for mksakeesh

I am trying to write some cd details to a file, from a queue. First i have taken all details from keyboard to a Queue and the made to write all those to a file in ascii format. Each queue has details like CD ID, film Name, film language, film …

Member Avatar for ArkM
0
99
Member Avatar for leloo_d

Hi there, i have some problems with lists and structs (or perhaps pointers in general) I am sorry if this was already discussed, but I really spend some time searching, but I am pretty new to programming and I did not find anything. I need to use a list of …

Member Avatar for leloo_d
0
87
Member Avatar for castrohe

I am trying to make a priority queue with a specific type class 'alumnos'. I create 3 new classes (new, medium, old) who inherit from it. Then I insert the classe into de queue. I would like to use polymorphism when extracting to use the correct function 'verificarEdad' but gives …

Member Avatar for castrohe
0
9K
Member Avatar for Yellowdog428

I am working on an assignment for class and cannot for the life of me figure out how to use letters to choose a case for a switch statement. Here is my code [CODE=CPP]#include <iostream> #include <cctype> #include <cstdlib> using namespace std; // prototypes void showMenu(); int getVowels(char*, int*, int); …

Member Avatar for Yellowdog428
0
196
Member Avatar for Nemoticchigga

I am attempting to read a text file. [CODE] ifstream indata; indata.open(filename); if(!indata) { // file couldn't be opened } else { // file opened } // keep reading until end-of-file string data; while (getline(indata, data)) { //this is where i want to store values } indata.close();[/CODE] I want to …

Member Avatar for VernonDozier
0
83
Member Avatar for sfumes

Hello all, I am trying to create C++ DLLs with functions that I can call from matlab. From Matlab, I can call "loadlibrary" w/o a problem but when I want to view the functions using "libfunctions" MATLAB says "No methods for class lib.C:\Sam\MathFuncsDll\debug\MathFuncsDll or no class lib.C:\Sam\MathFuncsDll\debug\MathFuncsDll." I am using …

0
43
Member Avatar for godlike111

someone help me make a program about this triangle....... * * * * * _ * * * * _ _ * * * _ _ _ * * _ _ _ _ * can someone show me the code for this program using "FOR LOOPS" please..... thanks.....

Member Avatar for chirru
0
118
Member Avatar for NavenKumar

I almost completed the system but i'm having problem with reading/writing to text file Bcoz i can't login nor add details as its not reading from the the txt file Pls do help me Thanks In Advance

Member Avatar for NavenKumar
0
169

The End.