51,593 Topics

Member Avatar for
Member Avatar for jerim

I am working on a class assignment that doesn't meet for a few more days. The assignment is to open a text file, and parse the file one word at a time, reading each word into one of 26 arrays based on the first letter of the word. I can …

Member Avatar for jBat
0
496
Member Avatar for Pilot Boy

Well hello! I'm having problem with reading data from notepad.. So here is what I'm trying to do. etc.. I have notepad file "Doc" and in it there are few things: Level= 5 Cash= 100 And what I want from my program to do is to read Level and Cash …

Member Avatar for Pilot Boy
0
405
Member Avatar for kinnu

[B]how to display text on [U]right side of window in caption bar[/U] (titlebar) .Is there any function available to do this ?[/B] [B]plz help.[/B] [MFC]

Member Avatar for marco93
0
66
Member Avatar for FatimaRizwan

[CODE]// basic file operations #include <iostream> #include <fstream> #include <string> using namespace std; int main () { char* pch; string line; fstream myfile; myfile.open ("Ahoo.txt"); if (myfile.is_open()) { while (!myfile.eof()) { getline (myfile,line); cout<<line<<endl; pch = strtok (line," ,.-"); while (pch != NULL) { cout<<pch; pch = strtok (NULL, " …

Member Avatar for jonsca
0
447
Member Avatar for popo_prince

i can't get this to run. my math functions at the end have messed up logic. and the superfluous function headers and such. i don't think the math output is linked to the desired output of the payment. [CODE] #include <iostream.h> #include <math.h> #include <cstdlib> #include <iomanip> //here i am …

Member Avatar for jBat
0
233
Member Avatar for makan007

"I am trying to display an array of digits using rand. My final result need to be: 1) Output all digits <=40 to the left side of array 2) Output digits > 40 to the right side of array Prob: The random digits does seems to change & result incorrect …

Member Avatar for kvprajapati
0
102
Member Avatar for abi.sakthi08
Member Avatar for kvprajapati
0
43
Member Avatar for torokun

[URL="http://img686.imageshack.us/img686/3380/hw1.jpg"]http://img686.imageshack.us/img686/3380/hw1.jpg[/URL] Okay so I got homework from my IT programming. I am completely oblivious in programming so I need a bit of help getting me into the right direction. Here is the question to understand my flowchart: Above is the link to my flowchart. Consider N students receiving the marks …

Member Avatar for tedroger
0
86
Member Avatar for haseeb1431

i have three integers per line in a text file but when i read a file it prints four integers Code: [code] #include<iostream.h> #include<conio.h> #include<fstream.h> void main() { int clas; ifstream inf; inf.open("kash.txt"); do { inf>>clas; cout<<clas; } while(!inf.eof()); } [/code] here is the file kash.txt (no enter after the …

Member Avatar for vmanes
0
153
Member Avatar for rkulp

This function is suppose to randomly chose 2 out of 16 dice, swap their positions, and then chose what side of the dice is facing up. The problem is, when I run the function (I loop it 250 times). It only changes a few dice and the board looks close …

Member Avatar for hag++
0
247
Member Avatar for trevorthecat

Hi, I have to create a program that takes 20 random numbers between 0 and 100 and sorts them in order from smallest to largest. Then, I have to used File I/O to output the list into a .txt file.My code is compiling, and I'm getting the random numbers, but …

Member Avatar for WaltP
0
130
Member Avatar for Grovespaz

Hi all, a friend told me to take a look at this board whenever I got in trouble coding. At the moment I'm studying a game, disassembling it, mapping out parts of the scripting engine, etc. I have a proxy dll which I use to hook certain functions (d3d8.dll), and …

Member Avatar for Grovespaz
0
69
Member Avatar for arva

Hey, I have a big problem. I want to do a program which will get a part of the screen of a program. After that It will show this small rectangle in Image component in BCB. But the problem is, it has to refresh it at least 10 times in …

Member Avatar for arva
0
188
Member Avatar for jonnybgood

Hi, I need your help. I'm searching for very tough C++ tests over the net. Can you send me links of such a tests. Thank you!!!

Member Avatar for Narue
0
118
Member Avatar for Excizted

Hello. I'm needing to store the IP adress as a variable in my application. I was then wondering, what the most efficient way of doing this would be? I would simply make 4 integers, and then in a setter function, read four arguments, and pass them into those four integers, …

Member Avatar for Excizted
0
207
Member Avatar for gamerchick

Hi, i have to create a algorithm called find2D, to find an element x in an n × n array A. The find2D function iterates over the rows of A, and it calls the algorithm findArray shown below, on each one, until x is found or it has searched all …

Member Avatar for abdelhakeem
0
129
Member Avatar for sehsa6

Hey frenzz I wanna make a Web content filter as my project. I have been looking for some help from past one month. I want ur help in making my project. Please help me explaining about its implementation or provide me with some links If u can. Any kind of …

Member Avatar for sehsa6
0
248
Member Avatar for Lukezzz

I wonder how the try, catch, finally function works. I know how try and catch works. What I wonder is if the try block is successful then I know that the catch block doesn´t execute. Is it true that the finally block doesn´t execute either ? [code] try { } …

Member Avatar for Lukezzz
0
133
Member Avatar for chaienbungbu

As I see in some code having something like "[b]ClassName[u]&[/u][/b]". For example: [code] // this demo // check if a parameter passed to a member function is the object itself #include <iostream> using namespace std; class CDummy { public : int isitme ([b]CDummy[u]&[/u] param[/b]); }; int CDummy :: isitme ([b]CDummy[u]&[/u] …

Member Avatar for jbennet
0
228
Member Avatar for Phil++

Hey, I'm to work on GUI interfaces with C++ but I have loads of classes that I want to use, will I have to re-code the whole classes or can I still use them? + Are they hard to implement and use? Thanks

Member Avatar for Ancient Dragon
0
96
Member Avatar for makan007

I would like to know how can the swapping function be implemented using pointers, void swap (int*, int*) [CODE] //function prototypes void swap(int& a, int& b); //function (passing by ref) void swap(int& a, int& b) { int t = a; a = b; b = t; }[/CODE] Is this correct? …

Member Avatar for problemkid
0
468
Member Avatar for Nikhar

Hey guys, I have got a C++ competition tomorrow and it is very important for me. Following are few of the questions from past years. Please, please, pleeeasse read them and guide me on how do I solve them so that I get some preparation for tomorrow [url]http://pastebin.com/m226a46ab[/url] [url]http://pastebin.com/m79b943db[/url]. [url]http://pastebin.com/m370be9ea[/url] …

Member Avatar for tux4life
-6
195
Member Avatar for Pradip_m14

Hi, Can you please let me know how can I use MS-Access in my C/C++ project.I m try to develop a project of ATM machine and I must have to use MS-Access in my project. Can you please help me ASAP. Pradip S. Mali

Member Avatar for CJesusSaves
0
57
Member Avatar for makan007

'a' was not declared in this scope. I can't spot the error. Pls advise. [CODE] #include <iostream> #include <cstdlib> #include <ctime> using namespace std; const int MAX = 10; void constructArray_2 (int*, int); int main () { srand (time (NULL)); constructArray_2 (a, MAX); } void constructArray_2 (int *a, int size) …

Member Avatar for makan007
0
238
Member Avatar for zakir123

i want programme in c++ a car stand 3hours in 2$ then another car stand 24hours in 10$

Member Avatar for adcodingmaster
0
141
Member Avatar for problemkid

Hi I am a beginner in C++ programming. I am required to use the power function for one of my programs and keep getting the error message. Below is my program [CODE] 1 #include <iostream> 2 #include <cmath> 3 using namespace std; 4 5 int main(){ 6 7 //Declare and …

Member Avatar for adcodingmaster
0
142
Member Avatar for dkanthi

Hi... getdelim function is posing an "undeclared identifier" problem during execution .so i included #define _GNU_SOURCE even though it is posing the same problem . i am executing the c++ program in visual studio in windows platform . how to add GNU extensions in Visual studio ?

Member Avatar for drekha
0
468
Member Avatar for sfurlow2

We have a programming project due in which we are supposed to create a boggle board. We are supposed to read in a file with the boggle dice (basically just sixteen lines of six random letters), then ask the user if they want to shake the board. If they say …

Member Avatar for sfurlow2
0
596
Member Avatar for gamerchick

Does Anyone know how i can convert this 1D array (findArray) that checks for an element Into a function called 2Dfind that searches a 2D and pass each array to arrayfind(), to do the searching [CODE] int findArray(int A[], int n, int x) { for(int i = 0; i < …

Member Avatar for dusktreader
0
230
Member Avatar for Lukezzz

I am using a backgroundworker that are doing Very much work. I have about 300 pages of code inside this worker, where it is happening a lot of different things. Everything happens inside a for loop like my code here. The problem is this that if I just as much …

0
63
Member Avatar for chaienbungbu

I read this code section from a tutorial, but I cannot understand it thoroughly. It is about Pointer & Class Pointer & Array Pointer. This is it: [code] // pointer to classes example #include <iostream> using namespace std; class CRectangle { private: int width, height; public: // prototype void set_values …

Member Avatar for chaienbungbu
0
180
Member Avatar for Aamit

[code] #include<stdio.h> #include<conio.h> #include<string> #include <iostream> #include<stdlib.h> #include "convert.h" using namespace std; int check(string); string send(string); string hr_str; int main() { int result=2,n; char tt[7]; char h[2],m[2],s[2]; cout<<"\nEnter the Time "; string colon=":"; while(result !=1) { printf("\nHR -> "); scanf("%s",h); result= check(h); } cout<<"\nMain Fun"<<hr_str; string t_time; strcpy (t_time,hr_str);//-----problem is …

Member Avatar for Ancient Dragon
0
3K
Member Avatar for rahul8590

I got this silly problem and honestly dunno why it isnt working . The scenario is i got a text file with information and i got to print the ASCII equivalent of the text into the screen . While attempting to do so , i am getting the binary equivalent …

Member Avatar for nezachem
0
200
Member Avatar for Eddy Dean

Hello, I've had some problems converting a string into a char. I've tried many, many things, but it didn't seem to work. I'll post the code below: [code] char filename[1024]; char* url; string sUrl; HINTERNET hINet, hFile; hINet = InternetOpen("InetURL/1.0", INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0 ); if ( !hINet ) { …

Member Avatar for Salem
0
2K
Member Avatar for fadia

I'm working on this program. There are 3 classes. These two classes [COLOR="Red"]PassengerMenu and SecurityMenu[/COLOR] are inherited from the class [COLOR="Green"]MainMenu[/COLOR] So the main menu would provide the logo and a description (normal cout). Also an access to either the passnger menu or the security menu. according to your choice. …

Member Avatar for fadia
0
169
Member Avatar for cpp_noobsauce

Ok so I posted this before but didn't get a response... Our prof gave us this problem: "Write a program that will get, from the user, a string of characters such as a sentence, and place this into a declared char array. Ask the user which letter they would like …

Member Avatar for Salem
0
240
Member Avatar for seul

Hello, i want to make a multiline listbox, that would look like [URL="http://www.daniweb.com/forums/attachment.php?attachmentid=13350&stc=1&d=1264164137"]this[/URL]. I was searching for solution for a week so i think now is the time to ask for help :( As you see this listbox is so special, because it has two lines per row and those …

Member Avatar for Protuberance
0
198
Member Avatar for Izarian

Hey guys, I'm working on converting some existing Java Code over to C++, trying to use only built in standard libraries because the platform we are building on we won't be able to have any outside libraries, and it's been a while since I had to write "fancy" c++ code …

Member Avatar for Izarian
0
138
Member Avatar for cruisx

Hi, i was wondering if someone could show me how to log into a website using c++ .net? I want to login to say megaupload.com for example, now i have to code in c++ but how could i do it in managed c++? A link or something would be great, …

Member Avatar for kvprajapati
0
276
Member Avatar for chaienbungbu

I'm a java developer. Recently, at university, I have been assigned a task about network programming with C++. The specification is about create a distributed application (with a server and many clients). If they allow to use RMI in Java or .NET Remoting with C#, it's easy for me, because …

Member Avatar for adcodingmaster
0
163
Member Avatar for jayrana

when i comple this code it says, wander.cc:28: error: 'Wander' was not declared in this scope I got this code from Jenny Owen's tuorial on Player/Stage. In that one th Wander function is not decalred. Could you please tell me why I am getting this error and how to declare …

Member Avatar for thomas_naveen
0
66
Member Avatar for wingers1290

First off thanks to all the members of daniweb for all there help and support, they've been fantastic. I'm on the last stage of my program and i need a little more help. I am using binary serialization to save information, i don't want to use xml because frankly it …

Member Avatar for wingers1290
0
172
Member Avatar for Japus

Hello I'm trying to use taglib in my Qt-program but it won't work. With this code, it doesn't compile although it should because I just changed the parameter [I]a[/I] from the example included with the source. [CODE]void Test(){ const char* a = std::string("song.mp3").c_str(); TagLib::FileRef f(a); }[/CODE] When I drop the …

Member Avatar for Anarionist
0
141
Member Avatar for Lukezzz

I have created a completely new new Windows Form application and are trying to add this namespace: [code] #include "stdafx.h" #include <ctime> #include <iomanip> #include <iostream> #include <fstream> #include <sstream> #include <string> #include <vector> #include <cmath> #include <algorithm> #include <limits> #include <ios> #include <cstdio> #include <numeric> #include <cstdlib> #include <ctype.h> …

Member Avatar for Lukezzz
0
207
Member Avatar for haydar

please i want the code of directed graph fast path and how i can creat graph to linked list

-4
44
Member Avatar for dlannetts

Hello, l sor of scribbled this code up from a few tutorial l have looked over, combining tutorials never works for a newbie to C++ :( now this is what l have written:: [CODE]// InfoMenu.cpp : main project file. #include <stdafx.h> #include <iostream> #include <string> using namespace std; int main() …

Member Avatar for dlannetts
0
240
Member Avatar for said.amsur

Hi I'm new to computer programming. 'Im just needing to learn some basic c++ for a larger project. So if someone wouldn't mind guiding me through some basics on i/o streams. I need to able to open a .txt file saved on my c drive and be able to count …

Member Avatar for said.amsur
0
230
Member Avatar for zulqadar

i am going to make the Database (i.e enter name, phone # etc) but how i will make it permanent (i.e to save it permanent). When i close the program and reopen, my previous Data that i had enter should Present??? How i will make it???

Member Avatar for tkud
0
97
Member Avatar for sixstorm1

Hi all, I have two problems, the first being the most important: 1. I have a Win32 (Non-MFC) app with a window and a win32 menu on it (HMENU), and I've been searching all day for a way to display shortcuts (like "Ctrl+C") on the menu items. I know there's …

Member Avatar for bheron
0
201
Member Avatar for keeperx

I am attempting to write my first c++ program. It is a bot that will me used to connect to a Multi User Dungeon. The premis is this The application will open a server on a specified port on the local machine, and also connect to the MUD server. The …

Member Avatar for keeperx
0
261

The End.