51,593 Topics
![]() | |
[B][COLOR="Red"]I am at a lvl between beginner and intermeddiate with C++, and I can't figure out how to play a wav sound from a C++ program... I search it on google and all the code I look at doesn't make any sense to me. Can someone plz help me to … | |
I am trying to count the number of each letter grade for a list of students and count how many are male and female and how many students there are total. The problematic section is: [code] int ItemType::CountItems(int& ACount, int& BCount, int& CCount, int& DCount, int& FCount, int& MaleCount, int& … | |
Hi all, I'm a C++ programmer and now about to use Visual C++. May I know the difference in terms of functionalities? will my code written in classic C++ run on Visual C++? thanks. | |
I have a buffer of chars. I want to display them in a text box as hex. is there a simple way to do this? Thanks. | |
Hi guys, being a beginner I have some trouble with pointers. I don't know but something about using pointers is just not getting clear to me. My assignment requires that from an array of given values, the user inputs a particular integer whose every occurrence with in the array should … | |
Hi I have a particular problem in returning an element of a struct which matches a maximum of another element here is part of the code, which will work, but does not display the details[i].title, which part of my original Struct declaration. What am I doing wrong ? [code=cplusplus] int … | |
when i am using graphic in my program and copy the .exe file in another computer where c++ is not available its return a graphics error(EGAVGA.BGI) is not found. why?? and how can i solve this problem. | |
hi all, if you look at the code below you will see that i am trying to get a template function to return an iterator based on the type type of one of its parameters, i cant seem to get it to work i dont want to have to pass … | |
Hi, I need to write C++ code to find the factors of a polynomial.For eg. X^2-1 should return x-1 and x+1...anyone have any ideas on how to do this? | |
hi I have crreated a conde to try and take input rom a user as a string then break it up into bits and pass it o it's functions but the values are not releacting at the functions and anyone has any other way o converting a string into a … | |
I am encounter a problem that I dont understand what is happening. I use the Form application where I from Form4 will open Form22 like this wich works. [code] #pragma once #include "stdafx.h" #include "Form22.h" Form22 ^form22 = gcnew Form22; form22->ShowDialog(); [/code] What I need to do now is to … | |
I have trouble with getting the correct number of characters displayed when returning this simple function. Does anyone see what I am doing wrong in the function (the cout function outputs -2 instead of 4 which is the lenght of "test")? Thanks: [code] #include <iostream> using namespace std; int mystrlen(char … | |
Hello Sir/Madam.... I have recently joined a company in which they have asked me to study vc++ tool.. IF there are any websites that you would suggest for me to go through and author of any good books for vc++ which are available, it would be very helpful.. Thanking you … | |
I'm writing a class for simple equation parser. I've completed the - and + operators, and am currently working on implementing brackets. They seem to work most of the time, except I occassionally get strange results, such as with 10 - ((10 - 20) + (10 - 20)) returns 40! … ![]() | |
I am a 17 year old beginner to C++ I want to find a beginner project that I can set my mind on so I can have a clear goal. What projects do you recommend? Please make them beginner friendly. I am having a huge problem with lessons, so I … | |
My project is to develop a 2D LAN ( 2- player) game in MFC. Would anyone of you recommend a game which would be easier to develop? | |
Hello, I am working on this program and am having problems trying to figure out how to display my results. I know I need to create a void display() option, but I'm not sure what to define within it.... Here's what I have.... [code=cplusplus] class Complex { public: Complex(int r … | |
Hello all, I was wondering how I could make this with larger numbers instead of scientific notation or whatever it is. I have attached my code and here is what I did: 1. Typed in E for exponent and hit enter. 2. Entered 9 and hit enter. 3. Entered 9 … | |
Can't figure out a for statement that will make this function work...help please ASAP Receives nothing from main Returns an even integer Ask the user for an even integer Read in the user’s input value. Repeat the prompt and input for any invalid numbers until a value of the correct … | |
please tell me problem in this code <snipped attachment> | |
please tell me how we can delete any record in the code in c++ using class | |
after you switch (variable) case 1: etc.... if the switch defaults, how do you return to repeat the switch case? do you just do a simple cin>>var and it will reset or you have to loop it? Sorry if question isnt clear | |
hey i need this for my exams the gave me a summary about a program which gets password from the user an saves it inside the exe itself.you can also give me help for encription please do write the source code | |
Hey guys, I've got a beginner question about this for some reason the getline function will not work, does anyone know why? I can't seem to figure it out [code]int main () { string studentname; int test1, test2; cout << "Enter first test score"; cin >> test1; cout << "Enter … | |
[CODE] #include <cmath> #include <iostream> #include <fstream> #include <iomanip> using namespace std; bool InitializeBoard(int** connectNBoard, int numRowsInBoard ); bool MakeMove(int** connectNBoard, int numRowsInBoard, int player, int columnChosen); bool DisplayBoard( int** connectNBoard, int numRowsInBoard); bool CheckWinner( int** connectNBoard, int numRowsInBoard, int numConnect, int columnChosen, int player); int main() { int numRows, … | |
I am having a tough time grasping functions =/ the book we use is pretty much useless. My problems are 1) Knowing what to put into the function ( ) 2) How to validate it ( nothing in the book about it) Any help or ideas I will greatly love … | |
I'm currently working on a project that manages multiple notepad windows in a MDI client area. It runs just as I want it to, except that the notepad windows seem to freeze up and become glitchy inside of the parent window. I was told to look into using InvalidateRect, but … | |
I'm currently writing a program that takes in a function such as ( 7x+19 ) and I need to evaluate the function that user inputs at range of numbers. I've got the loop figured out to loop through my desired numbers, but I don't know what to call the function … | |
Hey all I've been writing a program that cheks an ISBN number as valid or invalid as an assignment for a class but I need a little bit of help. I get these errors when I try to compile it: error C2275: 'std::string' : illegal use of this type as … | |
In my HR interview, i had one question. But , i did not answer for this. Can any one give me answer for this? How to display the statement without using semicolon in c programming? i mean, you should use semicolon anywhere in the program. jillcatrina <snip fake signature> | |
How is it possible to put a picture before the listviewItem. Under C: I have a picture.bmp that I would want before "Item" in the listView1. I use "details" as for the property in the listView. "Item" comes up 5 times in a List but no picture. What could I … | |
i want to write a line of code that could extract a text ending with the character " - " example flower - // the out put i want is also flower in this text file there may be a lot text written in different formats, but i only want … | |
i need to write a c++ function that could read in the values of a text file, but in the text file we need to eliminate duplicate values; for example we may have values like ;;;; this is a text file, and it contains the above students, there first name … ![]() | |
Hey i'm trying to use this trim function i wrote but its going wrong for me. I can trim from the front but not behind, e.g. if i enter **bob it works but if i enter **bob** it just prints nothing. please help [CODE]#include <iostream> using namespace std; void trimFunction( … ![]() | |
i have a text file as follows; james nnnnnnnnn mmmmm kristy llllllllllllllllll oooooooo james pppppppp ppppppppppp james iiiiiii kkkkkkkkkkkk now for the out put, i want it as follows ;;;;;;; james nnnnnnnnn mmmmm pppppppp ppppppppppp iiiiiii kkkkkkkkkkkk kristy llllllllllllllllll oooooooo the code i wrote for this is as;;;; [icode] void … ![]() | |
Hi All I have following code running on Vista Business under IIS7. It works, but is incredibly slow (about 20+ seconds). I have the same code in Java and it's instant. It appears to be the line "int bytesRec = sender.Receive(bytes);" that is the killer I'm very new to ASP … | |
Hello, im not necessarily new to c++ but i cant seem to find a good way to get input from other devices other then the keyboard. To get keyboard input i have been using [ICODE]GetAsyncKeyState();[/ICODE] i was wondering if there was a similar function to get input from other input … | |
Hey i am making an exe which is made for handiling vulnerable data so i wanted to know wheather i could save some data (like name, passwords,etc) inside an exe because ini files and registry is not very secure. please help!!! | |
Hi, I am working on medium scale application around 14K lines of code. So can't post the code. I am using queue to throttle the speed from one end to other end. The problem i am facing is "queue is giving some garbage value on queue.front() function call after say … | |
Hello all i want to ask about the best books and sites that i can read from it about problem solving Dynamic programming - Backtracking - Graphs - etc..... thanks in advance | |
Hello, I've been pulling my hair out trying to figure out how to fix this. I don't have a lot of experience with OOP, so I'm at a bit of a dead end. I am getting an error: [QUOTE]error: expected class-name before '{' token[/QUOTE] The header file is this: [CODE]#ifndef … | |
Hey, my program is having trouble in the Solve() and Check() functions... basicaly, the Check() function is returning 1 or 0 based on different condtions, however after the 3rd or 4th time the value returned from function Check() is 1 and the if statement in function Solve() is interpreting it … | |
I'm still working on the same project as in my previous post, [url]http://www.daniweb.com/forums/post723480.html[/url]. Its a program that should serve as an assembly code debugger. For simplicity I only use one instruction, ADDI, here. The program should read the instructions from a text file, load the desired information onto the registers, … | |
Hello, I am working on small program that reads in a string consisting of minimum two words and a space between them. My dilemma is that i keep getting an error message. Can anyone twlm me what it is that i a ding wrong? here is my code: [CODE] #include … | |
First I'll explain what I'm trying to do. I am programming an airline check-in line. I am using a queue ADT to represent a the line. The data type of the a queue is a pointer to my Customer class. In my Customer class, whenever a customer leaves the line, … | |
This is my current coding, in my header file [code=c++] #ifndef _ADDRESSBOOK #define _ADDRESSBOOK const int MAXADDRESS = 25; struct PERSON { char fName[25]; char lname[25]; char Address[100]; }; class addressBook { private: PERSON people[10]; public: addressBook(); addressBook(char *fName, char*lname, char *add); addressBook(PERSON a); addressBook(PERSON init[], int count); bool addPerson(const … | |
I'm trying to make this program work like a game of BlackJack. However, the program will not listen to me when I try to end the loop. does anyone have any sugestions on how to fix this program? [code] #include <iostream> #include <ctime> using namespace std; double card = 0; … | |
Hi , I am trying to use a Boost shared ptr with a map template. I have a bunch of subclasses that will be derived from class TestSuperClass. I will then used a shared_ptr to point to the class and will use a map template so that depending on the … | |
Hi again. I wrote 4 instances of a structure to a .dat file. I called them north, south, east, and west. I created a new program to read that file and display the data. I am using the below loop. I am trying to JUST read the north data. I … |
The End.