49,761 Topics

Member Avatar for
Member Avatar for kevinn

So here is the problem. This won't compile. It always gives an error like : d.cpp:24: error: ‘string’ was not declared in this scope d.cpp:24: error: expected ‘,’ or ‘;’ before ‘{’ token Compilatie failed. [CODE=C]#include <iostream> #include <string> #include <stdlib.h> #include <time.h> int d(int amount, int dots){ // d(X,Y) …

Member Avatar for kevinn
0
172
Member Avatar for Darth Vader

I have searched for a way before what the most effective way and in this case important the fastest way is to seek backwards in a file to read the very last line in a file. Like in this case I want to search from the end and backwards to …

Member Avatar for Darth Vader
0
3K
Member Avatar for bkpally263

hey everyone, I am working on a project where I have a C++ library (a precompiled library ) that would be used in my application. My application is a Windows based console application.I am working on VisualStudio 6.0. I would like to add GUI to this application of mine. Could …

Member Avatar for Ancient Dragon
0
148
Member Avatar for gen84

Write a program that will ask the user for 10 numbers, store them in an array, print the array, and print the average of the numbers entered. You should: All steps should be pseudo-coded before actually going to the computer, and you will be required to submit the pseudo-code of …

Member Avatar for zortec
0
89
Member Avatar for pinsickle

I wanted to get some opinions on a good visual c++ book to buy. I am intermediate level when it comes to programming. I have already been through a class on C and almost done with my class on C++. So I want a book that is heavy on the …

Member Avatar for zortec
0
86
Member Avatar for H-man

I installed Dev-c++ 4.9.9.2 but "devcpp.HLP" file doesn't exist in HELP folder! Does anybody know where can I download it?

Member Avatar for zortec
0
50
Member Avatar for Jennifer84

I am trying to get a value from a specific cell in a dataGridView. I know how to choose a Row / Column but not at the same time. I have tried to get the value from row 3 in column 2 like below. But I cant find a Column …

Member Avatar for milind morey
0
108
Member Avatar for lashatt2

Hello Everybody, I m working on a IRC Chat application project. I would like to know how to insert hte bitmap into the chat window. I have got a few code snippets in MFC & its working perfectly in MFC. But i cant convert it into Win32. Can anybody pls …

-1
81
Member Avatar for cellus205

Ok we have been creating this calendar in our intro to programming class for about a week or so, and right now I am stuck on getting the start day of each month. I was thinking it should be total days (days in month + total days from 1800 - …

Member Avatar for midgetchris
0
113
Member Avatar for sreejithbabu

The problem in this is that the program accepts a string with spaces [B]only for the first input[/B] and not for the rest of the inputs. It seems that getline only works for the first input. How can you make the vector store string with spaces (as elements of the …

Member Avatar for sreejithbabu
-1
878
Member Avatar for Druyx

Hi Daniweb I'm not really new, I've been lurking on the site for a while now, and I've suddenly felt the urge to start contributing. Of course I need to actually have something worth while to contribute.... Anyway, I'm java and C++ programmer (depending on what I'm working on) and …

Member Avatar for Doctor Inferno
0
174
Member Avatar for sabian4k

Hey Guys, I have a text file that has numbers in it. And I need the program I am working on to search it as an array. How do I do that?

Member Avatar for fjrivash
0
96
Member Avatar for wmsigler

I'm having difficulties thinking through the logic of my natural mergesort program. I think I have the split working correctly, but my merge doesn't seem to be working at all, and the pseudocode in my book and what I've found so far on the web is fuzzy. This is a …

0
70
Member Avatar for redback93

I am trying to make a code, where the points are not working. The points always give an odd number. Can you try it, if you can see a problem, I would love help. [CODE]#include <iostream> #define cls system("cls") #define pause system("pause") #include <string> using namespace std; class games { …

Member Avatar for redback93
0
102
Member Avatar for chalgi26

I keep getting these errors. I'm so lost please help... fairly new to c++ programming. hashheader.h(8) : error C2144: syntax error : 'int' should be preceded by ';' hashheader.h(8) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int hashheader.h(14) : error C2061: syntax error …

Member Avatar for chalgi26
-1
186
Member Avatar for mokia1

But now can't finish it.. I can't figure out how to make the board display after every turn. Can anyone help? #include <iostream> using namespace std; void showBoard (char t[3][3]); int main () { char player; char t[3][3] = {{'1', '2', '3'}, {'4', '5', '6'}, {'7', '8', '9'}}; int place …

Member Avatar for mrnutty
0
109
Member Avatar for gen84

[code]/****************************************************/ /* File: Binomial Numbers.cpp */ /* */ /* Created by: Regine R Calinda */ /* Date: November 9, 2009 */ /* */ /* Program to compute binomial coefficients */ /* */ /* Inputs: (keyboard) */ /* Two positive integers (n & k) */ /* */ /* Output: */ /* …

Member Avatar for Ancient Dragon
0
121
Member Avatar for bman214

Hello, I am trying to use the CImg library to put images into C++, can someone help? I don't know how to use this program... PLZ HELP

Member Avatar for bman214
0
98
Member Avatar for qk00001

I have a small problem with string. How can I make the output str to be every single string i.e: string str="You are a good writer"; to be: str1="you"; str2=“are"; str3="a"; str4="good"; str5="writer"; //---------my_test_code,but not working yet. #include <iostream> #include <string> using namespace std; int main () { string str; …

Member Avatar for qk00001
0
110
Member Avatar for DeadJustice

I have a seg fault I can't seem to be rid of. Basically I'm building an AVL tree and I'm stuck on the insert method. gdb says it is occuring on the line with: while( temp != NULL && temp->key != k ){ Would someone please help? Thank you in …

Member Avatar for DeadJustice
0
198
Member Avatar for Phil++

Hey, I need to create some pseudo code for a class and I dunno if I've done it right or not. Any help? [code] Begin class Employee Initialise empty constructor Employee Initialise constructor Employee with parameters Define prototype for method getID(as integer) Define prototype for method getFirstName(as char array) Define …

Member Avatar for mrnutty
0
150
Member Avatar for sexyzebra19

I have 2 main if statements inside this for loop (lines 7 and 56). I'm trying to get so that if after all the iterations are complete, i.e. j = 51 the first and second if statements are not satisfied, then it will print out an error message. I have …

Member Avatar for GrubSchumi
0
99
Member Avatar for luskbo

Ok. I've been working on a pacman game using C++, and OGRE. Things have been going good, but I have run across a problem with the collision detection of pacman hitting the walls. Before I explaing, here is some of the source code. PacpersonObj Class Header [CODE] // PacPersonObj.h // …

Member Avatar for mrnutty
0
654
Member Avatar for mokia1

This is the problem: Write a program that reads in an array of type int. Provide facility to either read this array from the key board or from a file, at the user's option. If the user chooses file input, the program should request a file name. You may assume …

Member Avatar for mrnutty
0
71
Member Avatar for miag

i have to write a program in c++ that reads numbers(weight of an item) from a file until now i got it:) and then place this items in boxes.the goal is to use as less boxes as possible.Each box can weight no more than 10. place each new item in …

Member Avatar for miag
0
104
Member Avatar for halluc1nati0n

'Learning CPP' programmer here. So, bear with me. First off : [B]STRCAT : [/B] [url]http://www.cplusplus.com/reference/clibrary/cstring/strcat/[/url] When clearly the definition says : [CODE]char * strcat ( char * destination, const char * source );[/CODE] Why'd they use char str[80] in the example??? What types can be used?

Member Avatar for Dave Sinkula
0
106
Member Avatar for blahbla

i have a problem : Write the definition of a function, isReverse , whose first two parameters are arrays of integers of equal size, and whose third parameter is an integer indicating the size of each array. The function returns true if and only if one array is the reverse …

Member Avatar for blahbla
0
216
Member Avatar for Behi Jon

Hi, When I want to run a program in eclipse, I get "Binary not found" error . I have MinGW in c: root and I have added C:/mingw/bin to environment path .

Member Avatar for Behi Jon
0
71
Member Avatar for momike205

Here is the program: int i,n; double v_in[20+1],v_out[20+1]; cout << "\ninput n ? "; cin >> n; for(i=1;i<=n;i++) { cout << "input v_in[" << i << "] ? "; cin >> v_in[i]; } // reverse v_in and store the result in v_out for(i=1;i<=n;i++) { v_out[i] = v_in[n-i+1]; } cout << …

Member Avatar for momike205
0
102
Member Avatar for guest7

Hi, I am trying to see to which key the iterator is pointing in a map. is there a way to do so. Also, would it be the fastest way to store unique keys in a map. [CODE] mapType::iterator it = cube.begin(); mapType::iterator its = it; std::advance(its,1); for(; it!= cube.end(); …

0
56

The End.