49,761 Topics

Member Avatar for
Member Avatar for J.Killa

In my program, I have to input a word and then a character. The program will tell me how many times does the character appear in the word...my problem is that I have to find this character with the find(str,ind)...I know the ind is the index and can be manipulated …

Member Avatar for J.Killa
0
279
Member Avatar for bandit711

Every time i compile this code i come up with a additional set of numbers, but i don't know why. [CODE] #include <iostream> #include <stdlib.h> #include <iomanip> #include <string> #include <fstream> using namespace std; void calculateAverage(double quiz1, double quiz2, double quiz3, double test4, double& SAverage); int calculateGrade(double grade); int main() …

Member Avatar for bandit711
0
163
Member Avatar for MoZo1

Hi! I have a windows mobile 5 device, and I would like to make some programs for it. I need a free development environment (compiler and librarys) that runs on winxp. It would be a very big help if I could use my NetBeans which I have experience with. It …

Member Avatar for MoZo1
0
97
Member Avatar for vbx_wx

[CODE] void open_key(HKEY* Key , HKEY key , LPCTSTR subkey) { cout << Key[1] << endl; RegOpenKeyEx(Key[1] , subkey , 0 , KEY_ENUMERATE_SUB_KEYS | KEY_QUERY_VALUE , &key); } int main() { HKEY keys[] = {HKEY_CLASSES_ROOT , HKEY_CURRENT_USER , HKEY_LOCAL_MACHINE , HKEY_USERS , HKEY_CURRENT_CONFIG}; open_key(&keys[1] , hkey , "Software"); } [/CODE] …

Member Avatar for vbx_wx
0
69
Member Avatar for rkp728

If there is a pointer member in a class. Eg.: [CODE]Class XYZ { Int *x; Char *c; }[/CODE] Then in such a case what all precautations do we need to take while handling such a member and the class?

Member Avatar for jonsca
0
97
Member Avatar for RayvenHawk

Okay just so you all are aware before reading this, yes this is a homework assignment. No I have no code for it yet and no I don't want you all to solve it for me. Now the reason I'm asking for this kind of help is because I'm in …

Member Avatar for Ancient Dragon
0
95
Member Avatar for DanLB

Hi all - hope you can help me with this. I'm trying to search through a vector of struct's; I'm able to loop through the vector using a simple for() loop, but i'm unable to use the generic find(). Secondly i want to delete a element if there's a match. …

Member Avatar for kay25
0
2K
Member Avatar for Lukezzz

I wonder how it is possible to retreive a string from a function that is generating this string. How is it possible to get the string "SendThis" when presssing the button1 in this case and declare it to getgenerateString ? [code] private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { String^ getgenerateString …

Member Avatar for Lukezzz
0
155
Member Avatar for nitgru1123

Hi buddy,, can u jst refer me some links or share sum of ur own experiences about creating a text editor.....dat wut exactly the text editor is all about. I dont bother bout the inferface of it......i jst need how the core looks like....i.e. data structure implementation and all that....hope …

Member Avatar for CppBuilder2006
-2
83
Member Avatar for thileep
Member Avatar for mrbright88

i need help starting this program..........Write a program that finds and outputs the minimum element in an array int A[10]

Member Avatar for CppBuilder2006
-2
87
Member Avatar for JHus00

Hey everyone. I want to call dateConversion and send along the date string which I do with this "dateConversion(dateString);" I want that to print the month day and year. I will have to do it at this line "cout << "on " << date << endl << endl;". When I …

Member Avatar for Nick Evan
0
133
Member Avatar for #define

hello everybody! i have a question that i want to reverse the queue in BigO(1) time and space without effecting its enqueue, dequeue ,print and other function. thnx in advance 4 answering

Member Avatar for Narue
0
80
Member Avatar for Trents

Okay, so I am EXTREMELY new to programming and my teacher is not exactly a great one, sadly. I am attempting to sort a string alphabetically. For example: Prompt to enter name: Alex Joe John Bill Cait Then sort and print: Alex Bill Cait Joe John Here's what I have …

Member Avatar for invisal
0
145
Member Avatar for empror9

hello guys, i want to programming a simple game. please see these picures first picture: [URL="http://img519.imageshack.us/img519/6323/boardf.jpg"]http://img519.imageshack.us/img519/6323/boardf.jpg[/URL] second picture: [URL="http://img151.imageshack.us/img151/9964/18245360.jpg"]http://img151.imageshack.us/img151/9964/18245360.jpg[/URL] last picture: [URL="http://img25.imageshack.us/img25/3871/21456530.jpg"]http://img25.imageshack.us/img25/3871/21456530.jpg[/URL] "Jump over a token and capture the token. Every move must be a jump! Only horizontal and vertical moves are allowed, no diagonal movement in the game. The …

Member Avatar for Salem
0
116
Member Avatar for vskumar19

I m designing scientific calculator in vc++ technology I used an edit box for the text to appear and some buttons for the operators and numbers I enter 1st operand by clicking the button and then the operator.Now I want to clear the edit box to enter the second operand …

Member Avatar for Salem
0
103
Member Avatar for einas

Write a class datetype it can perform the following operations on a date , in addition to the operation already defined : 1-set the month 2-set the day 3-set the year 4-return the month 5-return the day 6-return the year 7-test the year is a leap year 8-return the number …

Member Avatar for einas
0
161
Member Avatar for Lukezzz

I have a little spoky problem here. I really cant understand what it is. I am reading a file that is completely empty. But still the second MessageBox is showing this string: "22" I cant wrap my head around why if( line != "" ) is executing and no character …

Member Avatar for Lukezzz
0
107
Member Avatar for KozZZak

Hello, I have a problem, I needed a change from C++ to C#. help anyone? I made it from this: ( This is script in C++ [CODE]using namespace System; using namespace System::Text; using namespace System::Net; using namespace System::Net::Sockets; String^ chr(String^ str) { Char^ c = Convert::ToChar(Convert::ToInt32(str)); return Convert::ToString(c); } Int64^ …

Member Avatar for KozZZak
0
272
Member Avatar for empror9

hello guys, i have a simple question which is how can i declare a variable to accept character and number at one time for example, i ask the user to input 'a1' to do something waiting for you

Member Avatar for empror9
0
196
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
97
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
100
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
478
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
641
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
163

The End.