51,592 Topics

Member Avatar for
Member Avatar for som3aman

Hey guys, I'm kinda new at C++ and need help writing a program that finds email addresses in text files and stores them in an array. The email addresses are then filtered to make sure there are no duplicates. They are then copied to an output file. The program should …

Member Avatar for VernonDozier
0
168
Member Avatar for tomtetlaw

If a 3D box(a bounding box) knows it's position, it's width, it's height and it's depth, what would be the most efficient(can run in real time) way of detecting if a 3D co-ordinate is inside that box? I already have something in place to check for it but I am …

Member Avatar for mrnutty
0
87
Member Avatar for ace8957

Hello everyone I have been trying to learn the greater mysteries of linked lists and have come across an error that is inexplicable to me at my current level of understanding. I have written a program that attempts to form a linked list to store student information in the form …

Member Avatar for ace8957
0
177
Member Avatar for deraj8

I have looked everywhere but i have not been able to find any thing about comparing two strings alphabetically. I tried comparing the characters of each string but i do not know what comparing characters actually does. i am assuming it just compares the ascii codes of each character? [CODE] …

0
263
Member Avatar for lgonzo

hello everyone, have a c++ test coming up and i am completing some practice problems, wondering if could look over what have so far what i got is in red. if see errors plse help me out

Member Avatar for tomtetlaw
0
81
Member Avatar for aatwo

Hey, sorry if this question seems basic however I am relatively new to C++ and have done some searching around but to no avail. I then came across this community and thought I would try it out :) Basically, using Visual C++ 2008, I have a custom data structure, lets …

Member Avatar for aatwo
0
139
Member Avatar for CreativeCoding

So in my last problem, someone said "Use a pointer" (or something like that). When I googled it. It had to do with memory blocks (at least, I think). So what is it? And, oh yeah, can you make it as simple as possible. I have tried seeing what it …

Member Avatar for Excizted
0
134
Member Avatar for CreativeCoding

make something where the console retrieves a file (preferably txt) and read each line separately? example: [CODE]fsocksthingy("data.txt"); cout << data.txt;[/CODE] while data.txt is: [CODE]name1 http://downloadlink.com name2 http://downlink2.com name3 http://downlink3.com[/CODE] and the result would be: [CODE]name1 name2 name3 Download which version > (input here) You chose name2! (opens http link to …

Member Avatar for Lerner
0
116
Member Avatar for dorkwad

hey mates We're writing a class "intArray_t" in c++ and we're supposed to forbid operations like: [CODE] intArray_t* t = new intArray_t(); intArray_t* t2 = new intArray_t(); //some code here, inserts and so on t = t2; [/CODE] and [CODE] intArray_t* t = new intArray_t(); //some code here, inserts and …

Member Avatar for dorkwad
0
199
Member Avatar for aianne

Hi! I need help! I need to create a program in c++ that ask a question, there is a multiple choice, display if your answer is wrong or correct. Like the gameshow "Who wants to be a millionaire" and included "LIFELINE" I tried and it runs but when I chose …

Member Avatar for tetron
0
245
Member Avatar for Sune

I need help with the following course assignment. Operator overloading shall be implemented in an existing composite Class. The overloaded operator shall be used to compare objects (strings) in a bubble sort sequence. It is not allowed to use Friend or Inheritance. My problem is if operator overloading only should …

Member Avatar for tetron
0
220
Member Avatar for SCoder1

(Before you read on I want to let you guys know I have knowledge of c++) I was just wondering if there's a way to program a usb driver? I know it's a lot of work but that's what makes programming fun right!! here's my problem I wanted to make …

Member Avatar for Salem
0
81
Member Avatar for P_funk22

Here's what I'm trying to do: Write a working C++ program that implements the following requirements: - Develop a CALCULATOR in C++ - Implement at least six distinct arithmetic functions - Allow for at least two functions to be combined - Validate user input: do not allow invalid input - …

Member Avatar for jonsca
0
144
Member Avatar for nmcentire

Hello everyone, Been using daniweb to solve most of my programming problems as a guest, and figured it was time to create an account. The problem I'm having, is that I have an assignment that requires use of the ncurses library. I have a partial program that I have to …

Member Avatar for jonsca
0
138
Member Avatar for D4n1sD

Hello I would like to program my own 2d game into C++. I know its hard I know it needs a lot of time but I strongly believe the only way to learn c++ is to program so if you won't swim deeper you will never learn to swim. I …

Member Avatar for CodyOebel
0
128
Member Avatar for VilePlecenta

Goal: Get USB drive letter upon insertion. Done so far: Detection of drive. ------------------------------------------------------------- Im using the method of RegisterDeviceNotification() [CODE]WM_DEVICECHANGE // Received message | DBT_DEVICEARRIVAL // Received Message | DEV_BROADCAST_HDR // Pointer from lParam | PDEV_BROADCAST_VOLUME //Pointer from DEV_BROADCAST_HDR Pointer [/CODE] When getting the index drive letter from dbcv_unitmask. …

Member Avatar for VilePlecenta
0
206
Member Avatar for scriptkiddy

Hi guys, I am trying to make a chat bot on Omegle, (sort of line SmarterChild on MSN, but for Omegle). Anyway, my problem is when I send my HTTP post, I am not receiving any data. I call recv, but it does not send me any data. When I …

Member Avatar for scriptkiddy
0
273
Member Avatar for Thew

Hello, I am encountering a problem when I try to connect to my webcam using CreateFile. Using the SetupApi, I found the interface path of my webcam: \\?\usb#vid_03f0&pid_5d11&mi_00#6&aad3e6&0&0000#{6bdd1fc6-810f-11d0-bec7-08002be2092f} According to the MSDN documentation I supposed that when I use this interface path in CreateFile, I will be able to read …

0
115
Member Avatar for alokannamalai
Member Avatar for scriptkiddy
-1
51
Member Avatar for tkud

Hi everyone. I am trying to write a program that controls access to my hard drive.i.e when this program is running, the specified directory can not be accessed. But first, s there any way one can create a folder using c++?

Member Avatar for tetron
0
130
Member Avatar for foodman123321

I am a newbie Well i was just reading a book named c++ primer and got bored so i just wanted to create a c++ consol game just for some fun I have created this thing any more idea and some repair in code? [CODE] void welcome() { cout<<"Welcome to …

Member Avatar for strmstn
0
118
Member Avatar for replic

Hey everyone, i've been trying to send some words seperated by spaces to a server and only the first word arrives. The connection stuff is all fine but i have absolutely no idea whatsoever how to make it send more than one word at once. This is what i'm talking …

Member Avatar for Salem
0
737
Member Avatar for Ultratermi

Hey, time_t sec = time(NULL); gives me the seconds since 1970. But... It works with the system clock... So maybe the system clock is not synchron on two computers... Is there a way to get the seconds since 1970 WITHOUT the system clock, so that it is synchron on two …

Member Avatar for Ancient Dragon
0
118
Member Avatar for jangab

how to delete a string index inside an array that the user inputs???,, could someone pls help??

Member Avatar for Excizted
0
99
Member Avatar for CreativeCoding

So i'm working on this program. And long story short, I need something that will allow the user to choose the dir/file and have the system set read-only to true. Here is a piece that I worked on. Only it crashes on the system line. [CODE]try { clear; char* dir; …

Member Avatar for thomas_naveen
0
202
Member Avatar for mebob

how would i make a new type of variable, like instead of int or double? would i use classes or something like that?

Member Avatar for Stefano Mtangoo
0
98
Member Avatar for sid78669

OK, so I am redirecting the input from a file. The input is read into a string. The problem is, when the input file ends, the program still reads empty lines and goes into an endless loop. I have added an if statement for it to detect 5 empty entries …

Member Avatar for sid78669
0
139
Member Avatar for theforgotten

i have an insert function: [code=c] template <typename T> void insert(T item) { string T_id = typeid(T).name(); int compare; if(T_id == "char *") compare = stricmp(this.item, item); else compare = this.item < item; // ... insert here } [/code] i'm trying to compare numbers,strings,classes but when T is <char*> i …

Member Avatar for theforgotten
0
139
Member Avatar for calypso8

Hi, I am fairly new to C++ but love to learn, so I wanted to create a simple program base on the group-party game mafia A.K.A "werewolf." Just so whoever is not familiar gets the background. I will use just an example of 10 players. In a ten player game, …

Member Avatar for calypso8
0
1K
Member Avatar for programer25

Hello guys... I wanna write a program that calculates a customer’s bill for the electric company. But there are two types of customers: residential and commercial. There are two rates for calculating an electric bill. Resident rates – Bill processing fee = $12.50 Service fee = $30.50 Alternative energy fee …

Member Avatar for mrnutty
0
91
Member Avatar for bsbomb21

we are suppose to write a nice display code for natural numbers in Resolve its OSU version of C++, everytime I enter code and compile it though i get this error? heres my code [CODE] concrete_instance class Queue_Of_Naturals: instantiates Queue_Kernel_1a_C <Natural_Put_To_With_Commas_1> {}; concrete_instance class Sequence_Of_Queue_Of_Naturals: instantiates Sequence_Kernel_1a_C <Queue_Of_Naturals> {}; …

Member Avatar for jonsca
0
535
Member Avatar for greatunknown

I have a class with private strings and after I set information I want to the given strings in that class I need to push that data to a vector, which is stored privately in a separate class...I feel as though my code makes logical sense but obviously I am …

Member Avatar for greatunknown
0
111
Member Avatar for Jaxzen

So, my assignment is to write a program that puts a password input from the user through various tests and output its level of security. I've not had much training in this as my teacher doesn't really help much, and I'm supposed to do this over spring break. [code] #include …

Member Avatar for vmanes
0
153
Member Avatar for Talguy

I have been coding an IP scanner for god knows what reason. The program kind of works. It does find active computers on the network but for some reason it does not find my computer using its network ip or its internal ip (127.0.0.1). Also it can not find any …

0
71
Member Avatar for piecykoos

hi, can anyone help me with my assignment, I'm new in c++ and any help will be much appreciated: "You must design, implement and test a simple board game. The design should follow object oriented principles and use the UML tools that were introduced earlier in the module. The coding …

Member Avatar for totalwar235
0
841
Member Avatar for steviebax

HI. I'm new to this forum and new to C++ programming so be kind !! I've got a program that reads in a batch load of tif files works on them one at a time and then outputs the files as .png. Problem l have is that the tif filenames …

Member Avatar for steviebax
0
102
Member Avatar for totalwar235

i am trying to create a massive list of letters and numbers using this program. but for some reason i keep getting an error (sometimes this occurs, sometimes it doesn't) [B]error PRJ0002 : Error result 31 returned from 'C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\mt.exe'.[/B] i also get(sometimes this occurs, sometimes it doesn't) [B]Unhandled …

Member Avatar for totalwar235
0
146
Member Avatar for twalls16

Im trying to add up 100 grades and get the averge but it wont compile because it "cannot convert from 'int' to 'int [100]. Can anyone help me?? [CODE] #include "stdafx.h" #include <iostream> using namespace std; int main() { int total, j; double average; int grade[100]= (56,97,73,59,68,79,86,67,79,66, 95,64,98,56,79,83,75,89,73,91, 52,72,63,81,62,85,37,78,100,89, 56,89,75,76,99,66,84,98,68,59, …

Member Avatar for twalls16
0
347
Member Avatar for pranay_agg

hi, can someone please tell me the approach i should take to find the distinct substrings of a string ?

Member Avatar for mrnutty
0
527
Member Avatar for nerdinator

I have created a few applications in MFC. But I want to start saving the contents of them to files(just like word,guitar pro or paint). I tried serialization provided by MFC but I didn't like it that much because I couldn't check anything that was saved at all. So,I wrote …

Member Avatar for Ancient Dragon
0
193
Member Avatar for Carrots

Hi, I'm having trouble understanding how I should use pure virtual functions in my inheritance tree. I've drawn a class diagram which shows what I'm trying to achieve: [img]http://i42.tinypic.com/2qjdttd.jpg[/img] Here is what I've written: [B]main.cpp[/B] [code] #include <iostream> #include <string> #include <list> #include "base.h" using namespace std; int main() { …

Member Avatar for mrnutty
0
134
Member Avatar for Faiza_Iqbal

first i had partioned my array into two subarrays. Then the quick sort switches to insertion sort for sorting the small sized subarrays. But the error is logic error, because when i enter 15 inputs, the first and the last inputs are not sorted at all..I think error is in …

Member Avatar for MyrtleTurtle
0
286
Member Avatar for zacory

I'm creating a program that maintains a log file. The file is created at the start up of the program and appended to throughout the run. This works perfectly fine, but I went and manually added the program to run at start up in the registry. The program runs as …

Member Avatar for tetron
0
93
Member Avatar for sid78669

I am using char * for getting data from the user. Now, if i just do [CODE=C++] char * data = new char[100]; cin >> data; [/CODE] The data is corrupted, i.e. only data before whitespace is stored; and the following is an example result: [CODE] enter: "Microsoft Co." data: …

Member Avatar for Geoff_Giraffe
0
284
Member Avatar for ckjie

Hi all, I'm new to this community. I am doing a project that I'd have to write a program to connect 2(at least) PCs together. each PC works as a server and at the same time as a client, which each of them can download the file which is shared …

Member Avatar for strmstn
0
185
Member Avatar for krishnakrmsccs

[B]MAC-LAYER LDA[/B] if (DataRate ≥ 12 Mbps) then // station is closed to AP RetryLimit =6 // default value else if (DataRate > 6 Mbps) // possible signal failure RetryLimit = 12 // begin to enlarge transmission window else if (DataRate ≤ 6 Mbps) // probability of failure is max. …

Member Avatar for Salem
-2
83
Member Avatar for habib_parisa

Dear all, I have to use a funny structure in my code which has a 2D array and allocate it later in the program. I do it but I get error which is written below. I have urgently to finish this part of the code. Would be agreat help if …

Member Avatar for VernonDozier
0
397
Member Avatar for lethal.b

iam a noob at c++ and trying to learn it so go easy on me. basically i am trying to enter a some letters such as 'helody' and then check the letters it has in it and place the remaining letters of the alpahebet after it. so afterwords it would …

Member Avatar for jonsca
0
112
Member Avatar for Buttacup

Hi! I've been looking through online materials on this matter with no concrete definitions of what I can do with this. I am trying to export some of the functions from my class residing in my executable. I have tried every which way I can imagine but the variables I …

Member Avatar for Buttacup
0
268
Member Avatar for charqus

Is there any function like this ? [url]http://wiki.sa-mp.com/wiki/Strmid[/url] Thank you :icon_cheesygrin:

Member Avatar for tetron
0
680

The End.