48,985 Topics

Member Avatar for
Member Avatar for Fenlevi

Hi guys,I was interesting,how to write a function,to determine the nearest square number that is equal or greater to the length of the string( for example 16 is the next square number after 13) I don't even know what is the mechanism of this function:-/

Member Avatar for Robert1995
0
96
Member Avatar for mehran.s.h

Hi everybody. How can I write a program with C++ that finds pattern. For example if we give the program 3 pairs like (2,5),(5,11),(1,3) and then enter 6 the program returns 13. note:the pattern was 2x +1. Thank you.

Member Avatar for tonymuilenburg
0
84
Member Avatar for ale_jrb

Hi. I'm new to C++, and I'm having problems understanding a certain type of function argument. I wrote this code to try and understand it, and it didn't help much. :) [code=cpp] #include <iostream> using namespace std; class TestClass { public: int a ( TestClass arg ); int b ( …

Member Avatar for ale_jrb
0
96
Member Avatar for doolsta111

Hi Guys, Im having issue with the following code. I am getting the following error? could someone please assist? [code]#include <iostream> #include <iomanip> #include <string> #include <vector> #include <fstream> #include <stdlib.h> using namespace std; class employee { /* Employee class to contain employee data */ private: string surname; double hourlyRate; …

Member Avatar for Ancient Dragon
0
122
Member Avatar for Vani17

Hi, I have to create an RSS feed reader in C++. I have worked with Expat Xml parser but only for parsing purposes. Can I use the same to read feeds from websites ? If not, please recommend what C++ libraries can be used to achieve the same. Thanks, Vani

1
29
Member Avatar for euclid135

Hi all, i,m trying to use A* algorithm to do my task; this is the code [code] //////////////////////////////////////////////////////////////////////////////////////////////////////////////// // STL A* Search implementation // (C)2001 Justin Heyes-Jones // // Finding a path on a simple grid maze // This shows how to do shortest path finding using A* //////////////////////////////////////////////////////////////////////////////////////////////////////////////// #include …

Member Avatar for euclid135
0
443
Member Avatar for vellayil

In linux Qt use “ksystemtray.h” for developing program. Anyone know which header file equal to “ksystemtray.h” use in Windows (mingW). Thanks Advance:)

0
70
Member Avatar for vellayil
Member Avatar for vellayil
0
62
Member Avatar for mrnobody

Hi, I'm doing a program to capture from USB camera. And to do the program, I need directshow which can be found in directX sdk. I read that the new versions of directx are not compatable with VC++ 6.0. Does anybody know where I can get an old version which …

Member Avatar for CppBuilder2006
0
608
Member Avatar for daviddoria

Is there a data structure that lets me push and pop things onto/off of a queue, but also doesn't allow duplicates? E.g. I want [code] queue a; a.push(1); a.push(2); a.push(2); a.push(3); [/code] to only have 3 elements, because 2 was added twice so the second time it is just ignored. …

Member Avatar for mattjbond
0
152
Member Avatar for timhuynh

Hi everyone. This is my first post . I develop this program in C-Free 4.0 with <iostream> header... And it working [CODE] #include <iostream> #include <cstdlib> #include <iomanip> #include <ctime> using namespace std; int main () { int random_num; srand((unsigned)time(0)); bool assigned_players[32]; for (int i=0;i<32;i++) assigned_players[i] = false; int n=32; …

Member Avatar for chiwawa10
0
157
Member Avatar for J.Killa

I'm doing a code in which a user inputs a word and then I have to output the word backwards, but for some reason, the black screen disappears when I enter the word...here's my code: [CODE] #include <iostream> #include <string> using namespace std; int main() { string word,backwards; int numchars=0; …

Member Avatar for WaltP
0
222
Member Avatar for pinsickle

Does anyone know where I can find info on setting up dll files to be called by a program? I am about to start a project but I realized it would be helpful if the finished program could be ran without a compiler on every computer it is to be …

Member Avatar for pinsickle
0
78
Member Avatar for coding101

We've just started I/O streams and i need some help with my prjct. Here is the lab: "Write a program that gives and takes advice on program writing. The program starts by writing a piece of advice to the screen and asking the user to type a different piece of …

Member Avatar for WaltP
0
206
Member Avatar for jigglymig1

my code is supposed to read in a binary file and then save the input to a text file. when i cout << coach[i] i get the output and jibberish [CODE]#include <iostream> #include <string> #include <cctype> #include <fstream> #include <cstdlib> using namespace std; int main() { char coach[500]; int i=0; …

Member Avatar for WaltP
0
127
Member Avatar for heynow12

I built a program that is supposed to read in a data file that looks like this for example: 1 2 3 4 5 6 2 3 4 9 8 7 1 6 5 7 4 2 1 3 4 5 6 7 2 5 7 8 3 1 3 …

Member Avatar for jonsca
0
154
Member Avatar for J.Killa

So I'm somewhat new to programming and I have a assignment in which I have to verify if the numerator entered by the user is a decimal, instead of a integer. If it is, then I throw an exception...the thing is I don't really know how to do it because …

Member Avatar for chary8088
0
142
Member Avatar for swolll

This is seg faulting whenever I try to remove anything. I've been trying to fix it for hours, to no avail. Any ideas? [CODE]#ifndef BST_H_ #define BST_H_ #include <stdexcept> #include <iostream> #include "btnode.h" using namespace std; /* A class to represent a templated binary search tree. */ template <typename T> …

0
50
Member Avatar for techie929

Hi everyone, I have to create 16 separate files for 16 nodes and write something in it. Is there any way in which i do not have to separately create sixteen files. //// sompe part of code which i am using [CODE] file2.open("Node0.txt");//Node0.txt is the file of ofstream type { …

Member Avatar for WaltP
0
76
Member Avatar for yuriythebest

Right basic question - I downloaded these source files, however there is no visual studio project file (sln) - how do I compile these in visual studio? [url]http://img146.imageshack.us/img146/5796/sourceu.jpg[/url]

Member Avatar for noey699
0
79
Member Avatar for NitaB

Hey guys! I'm trying to write a recursive function to take a number in binary form and change it to decimal. As of now I am having the dumbest problem. I can't seem to take 2 to a variable power. This is probably something so basic but I'm drawing a …

Member Avatar for jonsca
0
129
Member Avatar for xofth

I want to get only y and n from user to enter when user try to enter another it get the input again until user enter "y" or "n" i use this logic but its not working [CODE] do { cout<<"\n\n Enter Number: "; number=getche(); cout<<"\n Want to enter another:(y/n)"; …

Member Avatar for xofth
0
190
Member Avatar for angrycoder

I'm supposed to create a program that takes a input file and goes through it and outputs it into a index file and counts the number of times a word appeared. It is only supposed to do words that are 3 letters or longer and I can't figure out how …

Member Avatar for Lerner
0
154
Member Avatar for Drunk.scientist

I am getting an Error stating canot convert string to Char type code is as follows [code] /* Jonathan Thomas ITSE 2421 intro to object C++ begin sudo code: function takes in string variable called "verb" function uses string function verb.length to determine length of string assigns value to size …

Member Avatar for jonsca
0
205
Member Avatar for vmirz

My goal is to implement a sorting into a linked list. I have everything working thus far, but I'm a bit stumped as to how I need to change my insert function in order for an element to be placed in the appropriate location. Here's my code thus far: [CODE] …

Member Avatar for VernonDozier
0
142
Member Avatar for dls_20022002

IS THERE ANYONE OUT THERE THAT KNOWS HOW TO WRITE TO A FILE'S LINE, WITHOUT CHANGING OR DELETING ANY OF THE OTHER LINES FOR EXAMPLE IF A LINE SAYS Status: Show and i want it to change that line to Status: James plz help

Member Avatar for Lerner
0
79
Member Avatar for Jaxzen

My program is supposed to essentially be something like Wheel of Fortune. As long as the user guesses letters that aren't in the word, the program behaves properly. But, when the user inputs a letter that IS in the word, the program stops and doesn't continue at all. [code] #include …

Member Avatar for Lerner
0
169
Member Avatar for dadamson90

I am trying to write a program that has a .txt file. It includes 4 names, 4 pay rates and the hours they worked. I have to use the file and import the data and make a program that outputs each worker their pay rate, hours they worked and their …

Member Avatar for strmstn
0
77
Member Avatar for LevyDee

Im teaching myself the Win32 API, so im messing around learning functions and what not. So how do I change the text on the button if it is clicked? I cant figure it out. Thanks [code] #include <windows.h> LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); const int …

Member Avatar for LevyDee
0
106
Member Avatar for PDB1982

I had my code working properly, but once I added my last array, it goes through the compile and then errors out....and I'm not quite sure why.... [code] #include <iostream> #include <fstream> #include <cstdlib> #include <cmath> using namespace std; int main() { double num[100], sum, count, newnum[100]; int j,i; ifstream …

Member Avatar for PDB1982
0
81

The End.