51,592 Topics
![]() | |
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 … | |
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 … | |
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 … | |
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] … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
(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 … | |
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 - … | |
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 … | |
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 … | |
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. … | |
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 … | |
![]() | 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 … |
i'm not able to run my c++ program in turbo c.................... | |
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++? | |
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 … | |
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 … | |
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 … | |
how to delete a string index inside an array that the user inputs???,, could someone pls help?? | |
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; … | |
how would i make a new type of variable, like instead of int or double? would i use classes or something like that? | |
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 … | |
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 … | |
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, … | |
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 … | |
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> {}; … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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, … | |
hi, can someone please tell me the approach i should take to find the distinct substrings of a string ? | |
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 … | |
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() { … | |
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 … | |
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 … | |
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: … | |
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 … | |
[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. … | |
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 … | |
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 … | |
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 … | |
Is there any function like this ? [url]http://wiki.sa-mp.com/wiki/Strmid[/url] Thank you :icon_cheesygrin: |
The End.