51,593 Topics

Member Avatar for
Member Avatar for theonlywalks

Hi everyone, I have searched high and low across google, even throughout my textbook... I have this project where you have to design the different types of CPU schedulers. If there are three processes (arriving in this order), P1, P2, P3, and each process has a CPU Burst, then an …

Member Avatar for Salem
0
134
Member Avatar for jadkins

It sure gets your attention though doesn't it. haha. Anyway's, about me...I'm a Computer Science student, with what seems to be a heavy emphasis on C++. About 1.5 years in. I really love / hate all the problems that must be resolved when programming. I alway's find myself reading through …

Member Avatar for jephthah
0
31
Member Avatar for mikabark

Hello guys. Can I write structure data to child pipe? Usual examples are about writing char* or int type. I tried to write structure. But it does not look work. Will you check my code? ----------------------------------------------------------------------- [CODE]struct work_list { int heavy_rate; //0 - 5 level int work_owner; //thread id } …

Member Avatar for nezachem
0
143
Member Avatar for riotburn

Hi I have written a program for bootstrapping bond interest rates. The bond price I am getting is 101.99825... when it should be more like 101.999999..... The inputs to test are Bond Price = 102, ttm = 36, f = 2, face = 100, n = 5. Heres the program, …

Member Avatar for riotburn
0
119
Member Avatar for suncica2222

Simple: I have buffer LPBYTE lpBuf And I need size of it.I tried sizeof(lpBuf); but doesnt work properly. How to do it,which function to use?

Member Avatar for suncica2222
0
2K
Member Avatar for Stefano Mtangoo

I want to write C++ Class that is exported by a DLL/SO. I need my app to be x-platform so I will avoid non portables. I read somewhere I have to wrap methods in extern "C" to prevent name mangling. Is there a tutorial to make me accomplish this? I …

0
57
Member Avatar for i_luv_c++

hey guys im working on a homework problem which requires two things -count the total number of clumps -determine the longest clump i finally made my code to recognize the number of total clumps however i still cnt figure out how to determine the longest clump any help be great!thanks:) …

Member Avatar for JasonHippy
0
254
Member Avatar for vijayan121

Question posed by josolanes: [quote]I looked at your thread here: [url]http://www.daniweb.com/forums/thread88255.html[/url] from a couple years back And I'm starting to get a grasp of your first post. I understood how to do the factorial struct really quickly, but the _if and _for statements still make me feel uneasy, though I …

Member Avatar for josolanes
1
170
Member Avatar for eXsolved

Hey Guys/Gal's I'm trying to figure out how to make an array of function pointers, but let me explain what i mean: The array will need a 'key' value (string | char*) and a 'value' (function pointer). So basically the array holds a list of short names of functions. I …

Member Avatar for eXsolved
0
223
Member Avatar for nats01282

I have been told that C++ and C# are very simular, as i am learning C++ and ust downloading XNA which use's C# I just wanted to know if C++ and C# are similar (exept the fact they both begin with the letter C )

Member Avatar for venkat arun
0
160
Member Avatar for gnarlyskim

I'm looking for a few suggestions on different ways to input a polynomial into an array (coef[]) using a degree (double degree). I have one way that works, but my most recent project needs a new way to do the same thing (not sure why but it can't hurt to …

Member Avatar for venkat arun
0
103
Member Avatar for joydsouza90

:?: How do you make an object, say a rectangle, move in turbo c++, using right and left arrow keys? I want the object to move when a user presses right or left arrow keys. Please reply ASAP either here or at my email [I]<<email address snipped>>[/I]

Member Avatar for kirit275
0
1K
Member Avatar for kux

if u pass a std::vector by value to a function, does all of it's content get copyed? thx

Member Avatar for kunal kislay
0
2K
Member Avatar for harshareddy75

Hi guys, I have been using winhttp to download pages (openrequest, sendrequest etc.) However I dont know how to download images from these webpages at the same time using winhttp. Is it possible? If it is, could please direct me to the api or post an example? Thanks Harsha Reddy

0
43
Member Avatar for am5a03

Hello, guys! I got a problem here: You're given set of x-y coordinates (at lease 2 and at most 60000). You need to find out the number of positive slopes formed by those coordinates. e.g. 4(this is the number of points that you want to pass) 0 0 1 1 …

Member Avatar for am5a03
0
105
Member Avatar for meistrizy

Thanks in advance for your help. I am writing a program that is supposed to display a menu and ask the user to enter a list of his/her favorite games, then display the games if they choose to. The problem is that when it comes to entering the names of …

Member Avatar for VernonDozier
0
122
Member Avatar for mrnobody

Hi, I'm doing a program in dual core processor. I'm wondering, is it possible for write a program that is core specific..? For example, thread A only runs at core 1 and thread B only runs at core 2. I'm currently looking at [URL="http://www.threadingbuildingblocks.org/documentation.php"]Intel® Threading Building Blocks (TBB)[/URL].. Am I …

Member Avatar for Ancient Dragon
0
128
Member Avatar for Kyle Wiering

Ok, here goes, I've got a staticwindow where I am putting the information from keyboard presses and onscreen button presses. When I run the program, I can press the keys and they show up just fine. I then press the button on the screen with my mouse which also works. …

Member Avatar for Frederick2
0
446
Member Avatar for zendet

Hey guys, i need some help with a hangman project for school. The outline is: make program that plays the game of hangman, read the word to be guessed into a string variable. ( The programmer must make about 10-20 words to have one randomly picked each time a game …

Member Avatar for WaltP
0
456
Member Avatar for zrd0808

I am trying to copy a string into an array then write bits out to a file accordingly. (compression assignment). here is the code [code=c] // strnewdup(const char* s) returns a copy of a // null-terminated string, with the copy stored // in the heap char* strnewdup(const char* s) { …

Member Avatar for zrd0808
0
2K
Member Avatar for hurricane123

I have written a scanner program for oberon language compiler but its incomplete,in the botton i need to write certain code to make this program work properly,so can anyone help me to make this program work properly. [code] FILE *input; int row, col; token t; char buff[bufflen]; int tabwidth; int …

Member Avatar for WaltP
-1
593
Member Avatar for Asthuran

I've been looking around the site for an answer to this, only thread i've found pertaining to it was this: [url]http://www.daniweb.com/forums/showthread.php?t=96516&highlight=how+do+i+get+my+function+to+ask+a+question+and+wait+until+the+user+presses+a+key+in+C%2B%2B%3F&page=2[/url] and that thread wasn't very helpful, so, i'm sorry if it's been asked before somewhere. anyway, onto my question: The title was pretty self explanatory, I want to know …

Member Avatar for WaltP
0
1K
Member Avatar for fugnut

Hello all, I am writing a program that reads in from a file and depending on the first character read in, it will then read in other data and make calculations. The file has data similar to "C 10 or T 10 20" The letter being the shape and the …

Member Avatar for MyrtleTurtle
0
150
Member Avatar for Ian Morrison

I'm implementing an [URL="http://www.objectmentor.com/resources/articles/acv.pdf"]acyclical visitor[/URL] in my project and having some difficulties with the requisite dynamic_cast. The setup looks something like this: [CODE]class Visitor; class Entity { public: virtual void accept(Visitor &v) const = 0; }; class MyClass ; class MyClassVisitor { public: virtual void visit(const MyClass &obj) = 0; …

Member Avatar for Ian Morrison
0
96
Member Avatar for Tellalca

I cannot assign my rawWord value to the string array. The program reads a value from testText.txt and then edits it. Then this manipulated char rawWord[20]'s value must be assigned to the string array word[i]. When i debug i see that rawWord is edited correctly, but when it comes to …

Member Avatar for Tellalca
1
302
Member Avatar for brightstar
Member Avatar for Mr.Bling Bling
0
2K
Member Avatar for manutd4life

Hello just Admit in a university and new in C++ i just wanted to know how to do area for several circle How to modify the code below to do the area of circle?? here's the code: [code=C]//Calculate area of a circle #include <cstdlib> #include <iostream> using namespace std; // …

Member Avatar for Tellalca
0
130
Member Avatar for wckddudeman

Okay so Im having an issue,and am not able to find the actual problem with the code. I have a runtime error at : First-chance exception at 0x008b182b in OpSys.exe: 0xC0000005: Access violation reading location 0x00000000. Unhandled exception at 0x008b182b in OpSys.exe: 0xC0000005: Access violation reading location 0x00000000. I do …

Member Avatar for WaltP
0
208
Member Avatar for dalcocer

I am trying to get a WndProc Mapping solution to work so that I can avoid just making my WndProc static. In addition, a mapping solution is supposed to be great because I don't need to declare variables in my .cpp file, I can do it in my .h file …

Member Avatar for Kyle Wiering
0
188
Member Avatar for missmedude

I am trying to center the triangle, but I have no idea how. I am trying to make a triangle like below:[code] * *** **** ****** [/code](this is not the one I want, the format screws up) I kind of forgot, do i use something like printf? [CODE]#include <iostream.h> #include …

Member Avatar for WaltP
0
113
Member Avatar for fugnut

I have to write a program that reads in from a .txt file similar to 12345 Il 4350 (sales number, state abbreviation, amount) for the most part I dont have an issue with this, however I have to read in the State abbreviation as separate characters and ultimately alphabetize them. …

Member Avatar for fugnut
0
86
Member Avatar for xgenvn

I'm just a 4-months newbie in C++, and I have an assignment to do a small phonebook program for DOS or FreeDOS. This is what i got from days after searching: This is CTelrecord class that would save every record in details [CODE]class CTelRecord { private: int szTime; char szName[_MAX_NAME_LEN_]; …

Member Avatar for xgenvn
0
222
Member Avatar for techie929

Hi, Could anyone please tell me how should I concatenate the below two: unsigned char byte2[1]="0X"; unsigned char byte0[6]; byte0="29";

Member Avatar for strmstn
0
142
Member Avatar for anik biswas

hi, I cannot figure out the programme code for the following problem: Write aq programe code for printing all the combinations of the numbers 1,2&3. I would be gratefull if you can help me out with this. Thank you.

Member Avatar for Adak
0
89
Member Avatar for techie929
Member Avatar for Ancient Dragon
0
76
Member Avatar for Excizted

Hi people. I'd like to use MySQL in my application - would be an easy way for me to store users. But then I'd have MySQL credentials in my app, visible for everyone with a HEX editor, I'd suppose? And even though that MySQL user will have low privileges, then …

Member Avatar for Excizted
0
163
Member Avatar for msmedic
Member Avatar for jonsca
0
114
Member Avatar for jmatt110

Hey all, Trying to get a simple LAN based chat program going (required to use UDP and multicasting). I've tried both client/server and p2p implementations, yet I still can't seem to get it working. The best I've gotten with client/server is that clients on pc1 and pc2 will connect to …

0
129
Member Avatar for CaninA

anyone can do case statment for stack , queue and linked in one program plz ex: void main () do { cout << "1 - stack"; cout << "2 -queue"; cout << "3 - linked list "; cout << "4 - stack with linked list"; cout << "5 -queue ....... …

Member Avatar for uchihakyu
0
260
Member Avatar for chrishtones

How would I write a program that can tell what directory it is in? For example, how would I write a program that can tell if it is in C:\Windows or C:\Users or something like that.

Member Avatar for WolfPack
0
104
Member Avatar for CreativeCoding

So, in Visual C#, You were able to declare variables for everything to use. Like this: [CODE]namespace MrTwitterStalker { public partial class Form1 : Form { string fullUrl; public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { fullUrl = "http://www.rawrs.com/"; } } }[/CODE] but for some reason, …

Member Avatar for jonsca
0
125
Member Avatar for hurricane123

i tried to write a prrogram using array which take 5 digits as in put and reverse that digits,but that program doesn't work.below u can see my program [code] { int no[5]; cin>>no[5]; for(int i=5;i<=0;i--){ cout<<no[i]; } } [/code] try 2 correct the errors.

Member Avatar for restrictment
-1
107
Member Avatar for CreativeCoding

So I have this code: [CODE]String^ main = "http://www.lockerz.com/"; if(main == web->Url->ToString()){ MessageBox::Show("Hello", "WIN"); }[/CODE] and it's attached to a timer that ticks every 100 milliseconds. Oh yeah, and web is the web browser in VC++. But when I run, I get this error: [CODE]An unhandled exception of type 'System.NullReferenceException' …

Member Avatar for CreativeCoding
0
159
Member Avatar for Christoph928

In this programming assignment I need to implement a number of useful functions using a header file and an implementation file. I will place the prototypes for my function in a .h file, and implement these functions in a .cpp file. I will also need to write a driver (a …

Member Avatar for Stefano Mtangoo
0
176
Member Avatar for Covert06

Hello, I'm still a huge beginner in C++ and while i spent hours trying to find a solution to this problem i came to this forum pretty often and I thought it'd be a good idea if I try to ask about my problem. (If you notice anything that can …

Member Avatar for Covert06
0
3K
Member Avatar for TheWolverine

Hi all, I am trying to write a general function that when called is able to write the value of all the member variables of an object passed to it. This function is part of a class. The class objects that I want to write out each have a member …

Member Avatar for TheWolverine
0
339
Member Avatar for mertserimer

the inputs are these computer 21 sabanci 4 sabanci 6 university 6 university 12 computer 17 university 3 computer 9 computer 6 sabanci 2 university 9 problem occurs at third line when the input name1 is equal with the previous input name1. Really thx for helping. Sorry for mess. #include …

Member Avatar for mrnutty
0
178
Member Avatar for RobBobSmith

Hi everyone: I am a c++ newbie. I have created a matrix class based on dynamic arrays. My goal is to use it for creating 2D matrices that I can then use to solve heat/fluid transport problems. When instantiated, I need each matrix to be initialized with zeroes only. I …

Member Avatar for Lerner
0
152
Member Avatar for rees90

There was a post about this before: [url]http://www.daniweb.com/forums/thread88472.html[/url] but no code in it, this is the code I have written and it calculates the sine of x, but not exactly what I was asked to do, I have set counter to 15, and there should be no counter, it should …

Member Avatar for VernonDozier
0
188
Member Avatar for sniper6560

[code]#include<iostream>// e^x with factorial function using namespace std; #include<cmath> double factorial(double); int main () { int i=1; double x, a=1, j, y, z, E=0.0000000001;//E is error rate cout<<"enter x to get e^x : "<<endl; cin>> x; y=x; for( ; ; ) { j=factorial(i); z=y/j; if( fabs(z)<E) break; else { a=a+z; …

Member Avatar for VernonDozier
0
100

The End.