49,757 Topics

Member Avatar for
Member Avatar for forever23

Hello I need some tips regarding line striping i.e, number of lines joining with the indices and vertices in GUI using c++.

Member Avatar for zoner7
0
74
Member Avatar for alexa12345

For Input 4 15.01 15 3 3.01 The value of 'avg' is becoming 9.00. I don't understand why this should be 9.01. Please help. [CODE] #include<stdio.h> #include<math.h> double round(double x) { return floor(x * pow(10.0,2.0) + 0.5)/pow(10.0,2.0); } int main() { //freopen("10137.txt","r",stdin); //freopen("out1.txt","w",stdout); long i,n; double sum,avg,sum1,a[1005]; while(scanf("%ld",&n) == 1 …

Member Avatar for mvmalderen
0
131
Member Avatar for ryBowk

hi all, i am very new to programing and i have just writen a calculator for measuring building marerials, the program works great, but it dosn't look to pretty. how can i get my calculator to work in a window, instead of the default dev c++ command window thingy i …

Member Avatar for Frederick2
0
113
Member Avatar for Eric_

Hi I want to play a sound using directsound. As you can see i'm stuck already. [CODE] #include <dsound.h> #include <iostream> using namespace std; int main(void) {//CREATE OBJECT LPDIRECTSOUND8 ppDS8; HRESULT hr = DirectSoundCreate8(NULL, ppDS8 ,NULL); cout << hr; Sleep(2000); }[/CODE] I get the following error: 1>.\main.cpp(9) : error C2664: …

Member Avatar for Eric_
0
179
Member Avatar for goody11

Hey, I'm working on a Spanish program and I want to make it so that if somebody wants to type in an a with an accent all they have to do is press the pushbutton. I realize how to create the pushbutton but I don't know how to just insert …

Member Avatar for goody11
0
152
Member Avatar for Nogat21

Hey i have a problem about file copying. I have a source file opened with fstream and a destination file opened with FILE*...im trying to copy a chunk of the source file into the destination (the function receives as parameters the start second on the source file in which we …

Member Avatar for Nogat21
0
87
Member Avatar for kodak

I am working with TWordApplication that ships with Borland Builder6. I don't seem to convert to C++ successfully from MSDN examples. I manage to open word from my app and paste text from the clipboard. I have used Select() to select the entire document, but can't work out how to …

Member Avatar for kodak
0
128
Member Avatar for chaithanyap

[code]#include<iostream.h> #include<conio.h> class A { int a[10]; char name[10]; public: void read(); void display(); }; void A::read() { cout<<"enter rno name"; for(int i=0;i<3;i++) { cin>>a[i]; cin>>name; //cin>>a[i]; } } void A::display() { //cout<<count; for(int i=0;i<3;i++) cout<<a[i]<<name; } //int A::count; main() { clrscr(); A x; x.read(); x.display(); getch(); }[/code] here i …

Member Avatar for chaithanyap
0
127
Member Avatar for goody11

Hey, I can't figure what is wrong with this part of my program. I know that it has something to do with that my variable i is exceeding the vector boundaries but I can't figure out how to stop it. I try to make the program exit before the vector …

Member Avatar for vali82
0
179
Member Avatar for the great

Hello! I am having a problem with my program.I have made a program that prints the four different shapes one after the other. But the program should print these four different shapes side by side. I know there should be one outer loop for this but I am unable to …

Member Avatar for Sky Diploma
0
140
Member Avatar for duggydiggy

Greetings All, I was wondering about how a build process goes on in Vc++. I want to know that is there any intermediate assembly file generated while building a source file as what happens with gcc. If the answer is no ,then why gcc build process has this ones step …

Member Avatar for Hiroshe
0
73
Member Avatar for NickyU

I 'm making a game in C++ and I need some help, I want to display a bmp image. I want to read a a bmp file and save the color ids in a matrix. Could you please help me. :)

Member Avatar for mrnutty
0
720
Member Avatar for atch

Hi, I've got problem with method ignore from cin. This is my code: [code=cplusplus] void _name() { string name; char ch = 0; bool name_accepted = false; cout << "Enter your name: " << endl; while (!name_accepted) { while (ch = cin.get()) { //cin. if (isalnum(ch) || isspace(ch) || ispunct(ch)) …

Member Avatar for atch
0
179
Member Avatar for jake43

Can anyone help me to program standard deviation? Here is the instructions for this program: Write a program that takes as input five integers and outputs the mean and standard deviation of the numbers. If the numbers are val1, val2, val3, val4 and val5, the mean = (val1 + val2 …

Member Avatar for Tom Gunn
0
618
Member Avatar for jake43

I need help to sort this numbers, but the problem is it won't like i want it to be with the decimals. I tried changing the int to double but then the program will not run. Here is the code, please provide feedback. [code=cplusplus]#include<iostream> using namespace std; // function prototypes …

Member Avatar for mrnutty
0
204
Member Avatar for Shaitan00

Currently I have 2 applications that reside on the same system (local applications) that need to communicate. One is a C++ program that already uses mailslots to communicate with other system (remote) and the other is a new C# service I have just written. Given that the C++ application is …

0
73
Member Avatar for Belthemet

Hello. Currently I'm making a game in C++, its not my first game (Examples of what I've made is "The game of life" in both 3d and 2d, TicTacToe with my own AI algorithms (based on the graph theory), 2D Paratrooper game), however its my first programm that requires allot …

Member Avatar for Belthemet
0
152
Member Avatar for dennis.wu

c++: Why the member functions of one class can access to private data member of other object? I use vs2008 and g++ compiler. the codes are list below: [CODE=c++] #include <iostream> using namespace std; class Integer { int i; public: Integer(int ii) : i(ii) {} const Integer operator+(const Integer& rv) …

Member Avatar for dennis.wu
0
142
Member Avatar for selsium

could any one please help me to solve this error? error LNK2019: unresolved external symbol _Underst_Sql referenced in function _main 1>cartmot.obj : error LNK2019: unresolved external symbol _Read_Desc referenced in function _main 1>cartmot.obj : error LNK2019: unresolved external symbol _Assegna referenced in function _main fatal error LNK1120: 3 unresolved externals …

Member Avatar for WallyBags
0
71
Member Avatar for WallyBags

"return type may not be specified on a constructor" I am getting this error in VS10. Here's my code: (the error appears on the word class) ComplexNumDec.h [CODE][COLOR="Red"]class[/COLOR] ComplexNum{ private: double real; double imag; public: ComplexNum(double x, double y); ~ComplexNum(); ComplexNum operator+(ComplexNum x); ComplexNum operator-(ComplexNum x); ComplexNum operator*(ComplexNum x); }[/CODE] …

Member Avatar for WallyBags
0
2K
Member Avatar for lahiruchandima
Member Avatar for Ancient Dragon
0
84
Member Avatar for dzhugashvili

hello. I need help implementing an SSE2-accelerated MD4 implementation. I found one that I think may work at [URL="http://www.freerainbowtables.com/phpBB3/viewtopic.php?f=6&t=904&start=30"]http://www.freerainbowtables.com/phpBB3/viewtopic.php?f=6&t=904&start=30[/URL] it is the post by Corni: [QUOTE]“So, I took a crashcourse in how to implement MD4 and in what the hell is SSE2 and how do you use it, and implemented …

Member Avatar for dzhugashvili
0
138
Member Avatar for mybluehair

Hi. I have a c++ game where you make money throughout the game, and the game saves it to a separate txt file. When the game opens back up, it grabs the info in that txt file and puts it into a variable. Thats not the problem though. I'm adding …

Member Avatar for Protuberance
0
81
Member Avatar for yakovm

Hello I need a database 1)I need easily to find a minimal value in the database 2)I want to easily add and remove values(well its trivial I know) I tried to use STL map but I couldn't find an easy way to implement the first requirement. Thank you in advance

Member Avatar for ithelp
0
81
Member Avatar for jko2326

How do I read two different data types from a .dat or .txt file? For instance I have a file that is an inventory file that shows the item reference number, the item name, and the quantity available. Example of what the file may look like: 01 Textbook 54 02 …

Member Avatar for Protuberance
0
148
Member Avatar for beau_nerdathen

[TEX]Please help me about my project "Array Alphabet"[/TEX] this is the example output: a b c b c d e d c d e f g f e d e f g h i h g f e * I don't know how to start the program. Give me ideas. …

Member Avatar for mrnutty
0
92
Member Avatar for newbieneedshelp

Ive been working on this poker program for a while now and ive tried several different ways to make a poker game...i have to make it using very basic c++ ...ill try to post what i already have done

Member Avatar for Justin7
2
119
Member Avatar for kspicer

I'm supposed to write a function that takes an input, and then outputs a set number of digits based on an array. The code I have works for the numbers 1-10, but anything above that messes up because it goes on to a value that doesn't exist in the array. …

Member Avatar for kspicer
0
104
Member Avatar for bishop101

Hi guys, I'm just starting out and I'm having a little problem. When I run an application, it closes by itself right away. A few days ago I went to the Local Library and picked out "Sam's Teach Yourself C++ in 24hrs - I know it's a lie" It came …

Member Avatar for Dave Sinkula
0
95
Member Avatar for neha arora

i wanna know that if a program consists of 10 lines n if we compile it , it shows increased no of lines compiled why:icon_question:

Member Avatar for necrolin
0
87

The End.