51,593 Topics

Member Avatar for
Member Avatar for Bellerofont

I'm new in assembly and was trying to get this program to work, it supposed to calculate the square root of any integer but i don't know how to load the ax into stack, get the square root and return the value to the c++ variable, that was the closest …

Member Avatar for Bellerofont
0
165
Member Avatar for georgioue

Guys hello, i`m a new member here [IMG]http://images.devshed.com/fda/smilies/smile.gif[/IMG] Hello to everybody...I need urgently help... I have an assignment for C++. "We have a collection of emails. This collection has emails from Linguist.org, these mails are legal. these are in a file called ling_filenames.txt. We also have a collection of spam …

Member Avatar for Ancient Dragon
0
143
Member Avatar for savinki

i want to convert char array element into hexadecimal value. But the code i wrote is not giving the output as i expect. [code] unsigned char in[256]; void Text(const char *Buffer) { static char tempValue[256]; for(int i=0;i<=len;i++) { sprintf(&tempValue[i],"%02x", (unsigned char)Buffer[i]); in[i]=(unsigned char)tempValue[i]; cout<<"HexaValue"<<in[i]; } } [/code] this is not …

Member Avatar for Ancient Dragon
0
137
Member Avatar for saswatdash83

Can anybody tell that when Inline won't work though we have declared function as inline. i.e code replacement won't take place .

Member Avatar for Ancient Dragon
0
108
Member Avatar for avi1109

Hello, i'm stuck with a problem on binary search. I need to compare a string with an array of type string. It is changing the position from which the string should be read but z compare is not successful. here's my code. Any help would be appreciated. thanks in advance. …

Member Avatar for Ancient Dragon
0
138
Member Avatar for anerchy

i just wanted to make a program which reads 5 numbers then writes this 5 number. that's it but i couldn't. something's wrong and i couldnt find what is it. #include <stdio.h> void fun1(void) { int a=0,b=5,c=0; int d[5]; for(a=0;a<b;a++) { printf("%d\n",d[a]); } } int main() { printf("enter 5 numbers"); …

Member Avatar for anerchy
0
105
Member Avatar for superC

Hello! I need a help. I've got to make a program with insert and search function and I have to use to following. To create a database in which I will implement insert and search The part of code is given: [code] #ifndef CONTAINER_H #define CONTAINER_H #include <iostream> #include <string> …

Member Avatar for Ancient Dragon
0
109
Member Avatar for super star 90

please help to with this program by mainly using arrays and pointers ,... i need this program to check 2 matrix files "if they contain any character and if they contain cout<<"invalid"; " and to open them from .txt file Help with Code Tags cplusplus Syntax (Toggle Plain Text) [code] …

Member Avatar for Ancient Dragon
0
72
Member Avatar for agrawalashishku

Hello, Attached are two codes. Please compile them and check the output. The question I have is that I am unable to understand why is it that the memory location allocated to tempmemcheck are 8bytes + the last memory location and not 4 bytes plus the last memory location. Similarly, …

Member Avatar for Ancient Dragon
0
117
Member Avatar for Beagle

Hi folks, I'm just learning C++ (using Borland C++ Builder) and I am having difficulty reading data from a text file created in Excel. I am trying to read the data into vectors which I can then use in a model that I am building. The problem is that I …

Member Avatar for Beagle
0
118
Member Avatar for kartouss

Hello, I have a function which calculates time for a specific operation and prints the time... However i want to call the time in another function and display its value... The code is as follows:- [code=c++]int encrypt() { double encryptTime,Add,sub,sft,mix; // add + sub + sft + mix calculations encryptTime …

Member Avatar for kartouss
0
238
Member Avatar for light_handle

Can anyone please tell me how to store contents of a text file after reading it into a 1D array buffer and then accessing each separate element of the paragraph? Please help

Member Avatar for Ancient Dragon
0
86
Member Avatar for sjcomp

Hello, I have a statically linked library, which I'd like to convert to dynamically linked one. For that I'd have to export symbols. My question is what symbols should I export in case of the interfaces. Here is an example [CODE=C++] // ----- IA.h // Interface class class IA{ static …

Member Avatar for Ancient Dragon
0
174
Member Avatar for obsolucity

I'm not really sure how to go about implementing these functions in my queue, any help is greatly appreciated! Edit: I just realized, I also have no idea where to start for the copy constructor [code=cplusplus] #include <iostream> using namespace std; template<class ItemType> class Queue { private: int front; int …

0
67
Member Avatar for r30028

I'm having some trouble with dynamic memory allocation of a struct. The struct looks like this: [CODE]struct J { int w; int s; };[/CODE] During the execution of the program, the following line of code results in a crash, which when debugging was because of std::bad_alloc, which does not make …

Member Avatar for Salem
0
74
Member Avatar for Roebuc

Just a quick question, I am working with classes and I was trying to rename one as an array, ie: [code] addressType addresses[n];[/code] But I have decided not to make it an array. So is this a legal statement? [code] addressType addresses;[/code] Or does that only work for arrays? Thanks

Member Avatar for Roebuc
0
99
Member Avatar for Black Magic

Hey, i was just messing around and made a calculator and was just wondering if there was a way i could make it shorter? I'm not really bothered i just want to know? [CODE]#include <iostream> #include <conio.h> using namespace std; int main() { system("TITLE My Calculator Program."); system("COLOR 4"); double …

Member Avatar for Black Magic
0
142
Member Avatar for NinjaLink

My goal is to write a problem that will read in a length in feet and inches and output the equivalent length in meters and centimeters. As noted, There are 0.3048 meters in a foot, 100 centimeters in a meter, and 12 inches in a foot. I am only having …

Member Avatar for NinjaLink
0
137
Member Avatar for Black Magic

Just editing my calculator and looking at what functions math.h had and i came across pow, My program compiles and things like that so no error but if I'm not mistaken the answer is wrong. 6 ^ 1 = 6X6? = 36 (IS THAT CORRECT??) JUST IN MY PROGRAM IF …

Member Avatar for Black Magic
0
231
Member Avatar for followgoat

Hi, I am in an intro to C++ class, and need help with a homework. The below question requires us to allocate seats in the House for each state according to how large its population is. The entire problem is given all the way below. I have 2 queries: 1) …

Member Avatar for VernonDozier
0
86
Member Avatar for VernonDozier

Hi all, I am trying to install MySQL++ on Windows XP and use it. I was able to install it in Linux because the website: [url]http://tangentsoft.net/mysql++/[/url] provided an RPM that built the libraries for you. As far as I can tell, no such thing is supplied for Windows. Supposedly, MySQL++ …

Member Avatar for VernonDozier
0
301
Member Avatar for VernonDozier

Hi, I am working on a project wherein one program writes to a file, but allows a different program to read from that file BEFORE the first program is finished writing to it. In this project, the first program is a game. When someone scores in the game, that activity …

Member Avatar for VernonDozier
0
214
Member Avatar for guy40az

Can anyone tell me how I can read the resistance between pins 4 and 6 of the serial port using VB or c++?

Member Avatar for hammerhead
0
137
Member Avatar for BOTnPAID4

I wrote a program to calculate a loan, the program compiles and works fine, but I get an answer I do not understand. The answer comes out "$1.#J". I am pasting the code here I am using, I am not worried about the code it is a pretty simple set-up …

Member Avatar for Ancient Dragon
0
120
Member Avatar for tripjokers69

I have a two part assignment. Part one is to create a menu driven program using variables to do certain tasks. Part two is to convert the variables being used into 2 arrays. The code for part one is post below and works perfectly for everything that is required. My …

Member Avatar for tripjokers69
0
105
Member Avatar for donnerCobra

Hi everybody :) I have a big problem with embedded Python. I develop a plugin for a C++ application and want to "teach" this app Python Scripting, that users are able to script their own functions. the App = The C++ Application plugin = my plugin I develop for the …

Member Avatar for donnerCobra
0
202
Member Avatar for vijayan121
Member Avatar for David Wang

[B]Game I am about to make:[/B] Coins are randomly drawn from a set of possible coins and arranged in a line. Two players alternately remove and collect a coin from either end of the line. The game ends when all the coins are removed and collected by the two players. …

Member Avatar for Ancient Dragon
0
175
Member Avatar for edek

The program as it is generates: [ICODE]>Parent1 >Parent2 >In Child >Parent3 Successfull...[/ICODE] If I remove the comment from line 31 - just below "//THE PROBLEM:" so the "gets(buff);" is executed it gives: [ICODE]>Parent1 >Parent2[/ICODE] and... waits (both parent and child processes running - both waiting). I would like to be …

Member Avatar for vijayan121
0
261
Member Avatar for chihuyu

[code=cplusplus] #include<iostream> #include<string> #include<vector> using namespace std; int main() { string a; vector<string> b; vector< vector<string> > s; while(cin>>a) { b.push_back(a); s.push_back(b); cout<<s.size()<<endl;//A1 cout<<s[s.size()-1]<<endl;//A2 } return 0; } [/code] Any problems with this? If line A2 is deleleted,the program can run.So I think s does exist,but when I add line …

Member Avatar for mitrmkar
0
76
Member Avatar for Seamus McCarthy

Please help i'm trying to click on the screen just inside the box coordinates of (x,y) but it clicks everywhere on the screen!! [code=cplusplus] void cursorpoint() { #include "cursor.h" int x ; int y ; //x will have the x position and y will have the y position of mouse …

Member Avatar for Seamus McCarthy
0
147
Member Avatar for Black Magic

Hey, Say if i made a program where people could register a account, but if they closed the window, the program would close and not remember passwords yeah? Well if i used the open file etc could i save the password's to a file so it remembered them? Many Thanks. …

Member Avatar for Black Magic
0
78
Member Avatar for srinivasan34

Hi ALL I am Srinivasan S Saripalli. I have a VC++ doubt which I have notified below. Hope you can give me a solution. I have developed a ATL,COM 32-bit Service and in the Service I am implementing Timer functionality using either `SetWaitableTimer` or `CreateWaitableTimer`. When I compile my Service …

Member Avatar for caperjack
0
156
Member Avatar for AshishMehra

Hello All, I am trying to write a program that gets input from a USB Tv Tuner and records/captures images for further analysis. Could someone point me in the right direction and tell me what I need to do to enable my program to read in from a USB port …

Member Avatar for AshishMehra
0
90
Member Avatar for maysda19

I need help with adding a structure that allows user to enter name-score pairs. I also need help in modifing my sorting and average calculating functions so they take array of structures with each structure containing the name and score of a single student. In traversing the arrays, use pointers …

Member Avatar for Ancient Dragon
0
81
Member Avatar for rimmytose

Hi, first time poster here and I am trying to run the Twofish implementation that I found online. I have a very basic knowledge of C++ and I am only trying to get these files to run so that I can analyze encryption times and decryption times for a class …

Member Avatar for mitrmkar
0
108
Member Avatar for death_oclock

I'm writing a program that opens another console application with redirected input and output handles. I don't get any errors when I run this, but the console closes immediately, despite the system("pause") at the end. With the current solution, I have it redirecting to files, but another solution using pipes …

Member Avatar for death_oclock
0
272
Member Avatar for Aamit

[code] #include <stdio.h> #include <dos.h> #include <conio.h> int main() { int i; printf("CMOS Dump (format [address=value])"); for(i=0;i<128;i++) { outp(0x70,i); if(i%8==0)printf("\n"); printf(" [%2x=%2x] ",i,inp(0x71)); } } [/code] This program compile but not run ,it give runtime error. How to solve it??

Member Avatar for Salem
0
104
Member Avatar for Mark515

does anyone know the code to output "Wrong password final try" on a 2nd unsuccessful password input? and then make the program go back to the default start position for the program below? [code] #include <cstdio> #include <cstdlib> #include <iostream> using namespace std; static const int password=1705898; int main() { …

Member Avatar for Sky Diploma
0
91
Member Avatar for doddware

Hi everyone, Please bear with me this is my first post here at daniweb. I usually develop in C or assembly for embedded systems, but occasionally I have need to develop a PC application using C/C++ and have relied on Visual Studio C++ 6.0. Unfortunately I recently purchased a laptop …

Member Avatar for doddware
0
134
Member Avatar for Google Spider

Hi, I'm getting seg fault in this [code] #include <iostream> int main() { char *p; *p='w'; std::cout<<p; return 0; }[/code] I'm sure it is due to the line [code] *p='w';[/code] I interpret this line as [QUOTE]Value at address p = 'w'[/QUOTE]. I would like to hear an explanation on why …

Member Avatar for Google Spider
0
137
Member Avatar for CoAstroGeek

Python has some nice features for working with paths: [url]http://docs.python.org/lib/module-os.path.html[/url] Does anybody know of any C/C++ functions, techniques or libraries to do something similar? For example, if I'm passed a path on the commandline as such: x = "~/mystuff/../myfile.txt" In python I could get the absolute path as such: os.path.abspath( …

Member Avatar for vijayan121
0
183
Member Avatar for Ryuji5864

[code] #include "stdafx.h" #include <fstream> #include <iostream> #include <string> #include <cmath> #include <iomanip> using namespace std; const string ID = "- CS 1361, Spring 2008 - Lab 39"; void PrintDblArray (double[],int,ofstream&); int Smallest(double[],int); int main() { int i; double n, arr[50]; ifstream fin; ofstream fout; cout << "Running Lab 35 …

Member Avatar for Ancient Dragon
0
139
Member Avatar for picass0

i need to hash and generate a salt value of the password which input by user and save it to a file. i understand how to create a txt file, but i don understand how m i going to hash and generate a salt value from the user input? this …

0
62
Member Avatar for nurulshidanoni

i have this data..but how to sort the data in descending order together with the examid? [U]examid total[/U] 1: 25 2: 20 3: 46 4: 56 5: 12 6: 22 7: 20 8: 18

Member Avatar for localp
0
152
Member Avatar for ninjabreadman

Hello all, this is my first post here. I've been working as an assistant product manager at a software developer for 18 months, and I'm looking to put my resume out there within the next 6 months, as a either a product manager, or as an APM in a larger …

Member Avatar for ninjabreadman
0
87
Member Avatar for anifeelings

[B]Define the class Student which has name (char name[20]) and age(int). Define the default constructor, member functions get_data() for taking the name and age of the Student, print() for displaying the data of Student. i hv tried it.. am new to this language, am learning, this is what i had …

Member Avatar for Nick Evan
0
218
Member Avatar for Glitch100

Hi all Well this is my first post, and this looks like a good site to ask... Basically, i have Visual Studio 2008, without a clue on using it- My Request: To gain aid in making a program which does and has the following features- Drop down menu which contains …

Member Avatar for Ancient Dragon
0
129
Member Avatar for foolishdrift

Hey guys, I'm working on a problem where I need to use the direct-search method to find the intervals of the roots and bisection method to find the roots of the following equation x^3-3.5x^2+3.48x-0.85. Here is the code I have so far, the problem I'm getting is when the code …

Member Avatar for iamthwee
0
182
Member Avatar for srinivasan34

Hi ALL I am Srinivasan S Saripalli. I have a VC++ doubt which I have notified below. Hope you can give me a solution. I have developed a ATL,COM 32-bit Service and in the Service I am implementing Timer functionality using either `SetWaitableTimer` or `CreateWaitableTimer`. When I compile my Service …

Member Avatar for mitrmkar
0
221

The End.