51,593 Topics

Member Avatar for
Member Avatar for Ultratermi

Hey, is there a way to search a specific word in a string and get the position where it appears? Like with the std::string... There I get the INT position of the word... Hope you know what I mean... I cant find the same with System^String in WinForms... Only : …

Member Avatar for Ultratermi
0
103
Member Avatar for lisha.ahuja

Hi Friends, I am an java programmer and trying the code change in C++ now,Kindly guide me for the below issue I am facing, The code which I need to modify is Original code:- [code] /* **-------------------------------------------------------------------------------------------- ** Description : This class starts the event listener threads for BRANCH ** …

0
64
Member Avatar for jakesee

Hi, I have a Win32 + OpenGL sort of graphics engine I wrote myself for a simulation software project (still in progress). The problem is that this software must also have a linux version. Now this software is using MDI and Docking windows and what not so I am not …

Member Avatar for jakesee
0
202
Member Avatar for rwill357

I am a newbie and currently taking as a subject data structures and algorithms. I have posted the function I'm currently working on down below. It works the problem is I would like to ensure I'm meeting the professors intent. I'm supposed to write a recursive and nonrecursive function to …

Member Avatar for program_helm
0
129
Member Avatar for shaunmccann1

Hi, Ive got a similar problem, it seems a run of the mill thing to break a string into tokens yet its kept me head scratching for days, is there another option or is it a simple code tweaking problem. Fairly new to C/C++ but ive been coding in C# …

Member Avatar for shaunmccann1
0
162
Member Avatar for froggy1976

I have written this code and it compiles and works just fine but I would like to put the string day[7]; as private since the days of the week will never change and I am required to have at least one private member in my code. When I simply move …

Member Avatar for mitrmkar
0
129
Member Avatar for llamaboy

Hi I am trying to make a nursery registration form for an assignment at uni and have hit a stumbling block. I have written the functions but dont really know what to declare them as. Could anyone help. [CODE]#include <cstdlib> #include <iostream> #include <fstream> using namespace std; int menu(); //creating …

Member Avatar for llamaboy
0
122
Member Avatar for Phil++

Hey, I'm wondering if this is possible. I store customers in an array: [code] string customer[10]; customer[1] = "Phil"; [/code] But I have a menu, that has things like [INDENT]1. Display customers 2. Add customers[/INDENT] The thing I want to do is not show the 'Display customers' if there has …

Member Avatar for abdelhakeem
0
107
Member Avatar for m7md.is

hi every one this is the Project requirements i did the first three things but i have problme with number 4 You are hired by an electronics company aiming to build microwaves. You are asked to develop an application that simulates the work of these microwaves. Consider the following specifications: …

Member Avatar for m7md.is
0
224
Member Avatar for King Dede
Member Avatar for Stefano Mtangoo
0
327
Member Avatar for fsl4faisal

[code]#include<stdio.h> #include<stdlib.h> #include<malloc.h> #include<string.h> //int bin(int,int,int*); //int term; int main() { int *set; int num,*anum,j,i,k,term; printf([/code]

-4
47
Member Avatar for Nikhar

Hi... I'm trying to study graphs but I cant find a good tutorial on it. I googled it, but couldn't find what I needed. Can you please suggest me a good tutorial on graphs in c++. I am basically looking for how a graph class is implemented in c++, an …

Member Avatar for Nikhar
0
140
Member Avatar for coolfriend

please correct this------the desired output is in the bottom [CODE] #include <iostream> #include <ctime> #include <cstdlib> using namespace std; int main() { int randomNumber=0; int guess = 0; int balance=100; int amount=0; int bet=0; double balanceLeft; cout<<" Guessing Game:"<<endl; cout<<"Written by coolfriend:"<<endl; do { cout<<"Please enter your bet$100.00):"<<endl; cin >>bet; …

Member Avatar for jonsca
0
124
Member Avatar for dubeyprateek

hi everyone, i m messed up with intializer lis. please help me by solving these questions. [QUOTE]How does compiler impliments intializer lits? How intializer lits improve performence? When it is must to use intializer lits? When intializer lits must not be used?[/QUOTE] What is wrong with this pice of code.. …

Member Avatar for NaveenGowdar
0
216
Member Avatar for qupav

i have this part of my link list program [CODE]template <class E> LinkedList<E>::node * LinkedList<E>::getNode{ ... ... }(const E &item) [/CODE] and my compiler, bloodshed dev c++, says expected constructor, destructor, or type conversion before "*" token expected ";" before "*" token i don't think there is an syntax error …

Member Avatar for qupav
0
131
Member Avatar for wellibedamned

heya.. i wanted to ask if there was a way to give a pointer to a multidimensional array of, say, ints, as a function argument. i tried a somewhat natural approach, which seems to have failed.. i'm no expert at stuff like that, so i tried: [CODE] int numbers[ 10 …

Member Avatar for mrnutty
0
160
Member Avatar for kenoch

I have a problem with this topic ..Solution to algorithm using static and dynamic data structure

Member Avatar for Rajesh R Subram
-2
97
Member Avatar for grealish234

hey i have a problem with adding an is numeric checker to my code for my class when i hit a snag just wondering if i could get some help this is my first program so help is appreciated [CODE]// fun with physics.cpp : Defines the entry point for the …

Member Avatar for mrnutty
2
114
Member Avatar for tzushky

Hi, Simple but driving me nuts. I am trying to create a table of pointers to already defined structures. But I can't find correct directions and I'm not used to this so HELP pliz! I managed to do it for functions, for some reason I can't find how to do …

Member Avatar for Narue
0
185
Member Avatar for soloice

[CODE] //Encryption/decryption program that encrypts or decrypts //user input as a string. #include <iostream> #include <string> using namespace std; string encrypt(string text, string message); string decrypt(string text, string message); char choice; int main() { //Ask user to encrypt or decrypt cout << "Would you like to encrypt or decrypt?" << …

Member Avatar for soloice
0
91
Member Avatar for rohitn
Member Avatar for ashishchoure

hi, I am creating a ThreadPool. I know that thread pool is collection of [B]live threads[/B]. Its main purpose is to assign task to any of available thread. I am not going through any complex tutorial available on net. So I am just creating threadpool by my own. For this …

Member Avatar for ashishchoure
0
346
Member Avatar for johnny_gear

[CODE] while(getline(bookFile,books[count].title,';')) { bookFile>>books[count].year; bookFile.ignore(1); bookFile>>books[count].author; bookFile.ignore(1); bookFile>>books[count].price; count++; } [/CODE] the code seems to just ignore the deliminating character and enter the whole first line into the title member of the books struct. I can not figure out why, any help would be appreciated .. thanks

Member Avatar for johnny_gear
1
147
Member Avatar for shizu

Hi All.. I am using MsFlexGrid in my program.. normally after I double click, enter value, KillFocus then press OK to close the dialog.. now I would like to add a message box once I enter value. Then I found out that, after message box prompt out and I click …

Member Avatar for mitrmkar
0
139
Member Avatar for blasata

Hi all, I have a problem with winsock in c++ while developing a client program: - When I send the first, it is ok, appears in the Server, but the other "sends", in the server appear as a empty string! the send command return is Ok, the number of bytes. …

Member Avatar for blasata
1
203
Member Avatar for joejoe55

I am a c++ Beginner - Im looking to store a "Location" for a later use in this function and cant figure out how to do it still after hours of research. [CODE] if(pUnit) { if(GetUnitDist(Me, pUnit) <=10) { //Right Here need to store GetOldPlayerX() if(pUnit->dwMode == PLAYER_MODE_CAST) { if(GetOldPlayerX() …

Member Avatar for Nick Evan
0
104
Member Avatar for SonxQ7

Hi, i get [CODE]undefined reference to 'boost::gregorian::greg_month::get_month_map_ptr() '[/CODE] on the following code using Eclipse CDT and MinGW .. [CODE] #include "boost/date_time/gregorian/gregorian.hpp" #include <iostream> int main() { using namespace boost::gregorian; std::string s; std::cout << "Enter birth day YYYY-MM-DD (eg: 2002-02-01): "; std::cin >> s; try { date birthday(from_simple_string(s)); date today = …

Member Avatar for vijayan121
0
520
Member Avatar for zhouxuzhu1985

Hi, I've got a problem when I was using LoadLibrary function to load a library "MSVCR90.dll". It is a dll with manifest, but I don't know how to load this kind of library. Should I load the manifest first and how? Any suggestions will be OK. Thanks.

Member Avatar for zhouxuzhu1985
0
117
Member Avatar for Manxie

Hello, I'm new to using C++ and am using dev-c++ as a compiler only I'm having a problem as the code I've written doesn't stay open after the user has stated the name, here's the code. [CODE] //Game 3,0 //Using constants and strings. #include <iostream> #include <string> using std::cout; using …

Member Avatar for jonsca
0
96
Member Avatar for athlon32

I just learned about linked lists, so i decided to experiment a little. I'm trying to make a linked list that automatically keeps all of the data in consecutive order (like bubble sort built in :P). Anyways, the problem is that while it adds data, the second thing added disappears, …

Member Avatar for Ancient Dragon
0
90
Member Avatar for kiroyzki

Hi, i'm having problem on the computation of working hours, regular pay, overtime and gross income... on a time-in and time-out of an employee for a week including holidays and overtime... please help on making it work. e.g. of employee.txt Name: kiroyzki Code: A02-004 Level: 1 Salary/Day: 500/day ############################################ [code] …

Member Avatar for vmanes
0
175
Member Avatar for drjay1627

Hello, My friend and I are trying to program a basic 3D modeler. Nothing fancy just a very basic program. I was wondering if anyone here could help me with reading material. We need to figure out the math and that is what I can doing now. Any good books …

Member Avatar for BountyX
0
83
Member Avatar for CJesusSaves

Hello all, I am Lisa and fairly new to C++/MFC. For a class project, we are to develop any software of our choice and add as much functionality as possible. I have chosen to build a program similar to MS Paint since MFC has functions that makes building shapes very …

Member Avatar for CJesusSaves
0
157
Member Avatar for rwill357

This is what I have so far. This program should contain a recursive function that will compute the binomial coefficient according to the definition if k=0 or k=n [CODE]#include <iostream> #include <algorithm> using namespace std ; int C(int n,int k) { if (k < 0 || k > n ) …

Member Avatar for rwill357
0
194
Member Avatar for Fbody

I just started an advanced C++ course and my instructor sent around a file with this piece of code: [code]class smallobj // specify a class { public: smallobj() : iData(0){} // Constructor smallobj(int iInValue) : iData(iInValue) {} // Overloaded Constructor ~smallobj() {} // Destructor void setdata(int d) // member function …

Member Avatar for Fbody
0
1K
Member Avatar for clutchkiller

Hi, is there a quick way to format a float variable that is 0.775 to display it as 77.5? Thanks To better clarify, im doing a simple little tasks of variable = variable / variable to find the percentage of something.

Member Avatar for Fbody
0
79
Member Avatar for t_stewart1012
Member Avatar for sisse56

The program asks the user to enter physician name as array of character,but do not work properly ,only work for single character how can i input array of character for the physician name. look case 1 on my code. [CODE]for( i=0;i<n;i++) { cout<<"\nEnter physician "<<i+1 <<" name :"; cin>>phy_name[i]; cout<<"Enter …

Member Avatar for WaltP
-2
127
Member Avatar for V0ldemort

I'm kind of a noob at this, I have an error and i -sort of- know what it means, but I have no idea how to fix it. [CODE]#include "Sprite.h" int Sprite::LoadSprite(LPDIRECT3DDEVICE9 device, std::string Filename) { dImageScale = 1.0; D3DXIMAGE_INFO ImageInfo; D3DXGetImageInfoFromFile(Filename.c_str(), &ImageInfo); dImageHeight = ImageInfo.Height; dImageWidth = ImageInfo.Width; }[/CODE] …

Member Avatar for V0ldemort
0
191
Member Avatar for sonisuhas

how does the ramdomize function works?? does it have some formulae to bring out its output?

Member Avatar for Narue
0
137
Member Avatar for avirag

How can I convert a char that has this info in it "312,000" to a double? I know I can use atof but it doesnt work with the comma.. is there any way to remove the comma.. or to use atof when theres non numeric values in the char? Thanks

Member Avatar for Narue
0
2K
Member Avatar for Tunernetwork

I was told to ask my question here, so bare with me as I am new here! C+ code and vbulletin question I hope this is the appropiate place if not I apologize now and move if need be. I need help on this. I am workin on a site …

Member Avatar for sknake
0
145
Member Avatar for k1_zav

Hi people, I am writing a code to do some matrix manipulation stuff. like replication of a matrix in a bigger matrix vertically and horizontally, or putting some elements on a specific diagonal. The problem is that when the size of 2-D array goes to 290, the program crashes. The …

Member Avatar for k1_zav
1
83
Member Avatar for shizu

Hi all.. I had a part of code like below.. CPropertySheet oPropSheet("Page", NULL, 0); oPropSheet.m_psh.dwFlags |= PSH_NOAPPLYNOW; oPropSheet.m_psh.dwFlags &= ~(PSH_HASHELP); oPropSheet.AddPage(&oPropSettingCriteria); oPropSheet.AddPage(&oPropAdvancedSetting); if(oPropSheet.DoModal() == IDOK) { } ... now I would like to hide or disable OK button..just left only CANCEL button there.. I tried using oPropSheet.GetDlgItem(IDOK)->EnableWindow(FALSE); but will have …

Member Avatar for shizu
0
704
Member Avatar for Learning78

Hi; I have made a MCQ based game in Visual C++ using MFC. It runs fine but it shuts down when some key is pressed unintentionally. Like, if you click the options with mouse click, it works fine but even if you press ENTER key during the game, it quits …

Member Avatar for Learning78
0
202
Member Avatar for ashrut

i m feeling problem in making a program for attandance management. can u help me plzzzzzzzzzzz

Member Avatar for thekashyap
-1
93
Member Avatar for coolfriend

Plan and code a guessing and betting number game, as described by the text below and the sample output but do not write any functions (other than main). An appropriate welcome message with your name in it should be shown at the start of the program. The user starts with …

Member Avatar for WaltP
-7
283
Member Avatar for valleymorning

Hi all, The code below is to converts a tchar from lowercase to uppercase. Could you tell me if my code is correct or need to be fixed. Thank you very much. VM =============================== [code] tchar* MyToUpper(tchar *input) { static tchar buffer[1000]; tchar *s= input; tchar *t= buffer; while (*s!= …

Member Avatar for Sudar_Gudi
0
2K
Member Avatar for Nikhar

I have made a program to the follwoing problem:- [QUOTE] Another chessboard puzzle (this one reputedly solved by GAUSS at the age of four) is to find a sequence of moves by a knight that will visit every square of the board exactly once. Write a backtracking program that will …

Member Avatar for Nikhar
0
174
Member Avatar for Amonod

This might be a bit of a silly question and I should probably know this anyway. I have tried searching for it but I have not found anything on this subject(or the more plausible reason, I have not been searching for the right things since I don't know much about …

Member Avatar for Ancient Dragon
0
168

The End.