51,593 Topics
![]() | |
Hey guys. This is really frustrating because it seems easy but I can't seem to find the correct function to remove this element of my string. [code] void set::display() const // pre : none // post : displays the elements of this set enclosed in braces and // separated by … | |
Can someone help me to solve this algorithm, I tried our school book but can't understand it. I'm not good at math! Should be simple, but i just can't understand it! [IMG]http://i38.tinypic.com/5wdau.jpg[/IMG] | |
Ok guys, i'll say this first. I got it 99% working (100 % working if I test it with the much shorter name list that we are suppose to use for the homework.) For some reason the code skips the very last name. Honestly, I think I am over thinking … | |
Recently I was assigned a program for class and I've been having some problems. At my old school, the teacher worded the instructions differently, so I am not entirely sure how to translate the following lines of instruction into the proper setup for my structs, arrays, and shorts. Instructions: 1. … | |
I am working on a doubly linked list assignment for my class and I am getting a segmentation fault on my test for the copy constructor. I don't know if the problem lies within my copyList method or my copy constructor logic. Any assistance be great. Here is my header … | |
Write a C program that can be used as a database of student’s information for the statistics and computer science department. Populate the database with 10 records. The program should be able to dynamically allocate or deallocate storage for the student’s records using linked lists. The database should have the … | |
can you tell me what differences are between c & c++? | |
#include <iostream> #include <sstream> #include <fstream> #include <vector> #include <string> using namespace std; class PriceFeed { public: PriceFeed(vector<string>& tickers) { // init(tickers); } } int main () { vector<string> tickers; tickers.push_back("AAPL"); tickers.push_back("XOM"); //PriceFeed(tickers); PriceFeed pf = new PriceFeed(tickers); [COLOR="Red"]// Error on this line[/COLOR] system("pause"); //return 0; } Can you please … | |
hi everyone...can any one tell 10 advanteges and disadvanteges of c-language plzz urgent | |
what is the programe to solve the even ordered magic square? | |
I have a calculator program and I want to add a progress bar. The progress bar is for visual effects only; I want it to animate for just enough time so that it will be noticed everytime I hit the "=" button. I'm a newbie in making forms and actually, … | |
[B]Why I can't compile a helloworld with Unicode supported by wxDevC++? [/B] I made a test programm. But I can only compile it by GCC compiler (library type is static lib) without wxwidgets Unicode support. If I checked the Unicode support at compiling setttings, it said ld error, can't find … | |
I have a huge amount of home work that my c++ teacher gave me at school, can you do that questions while i have to study chem and phy and maths for the exams. just post the answers. i have attached the questions. thanks | |
OK, I'm trying to write a program that uses a circular linked list. I have been playing around with a linked list program all day, and kinda understand it. Here it is, and yes it does compile. [CODE] #include <iostream> using namespace std; struct node { char name[20]; // Name … | |
Hi, I need to copy a file from one location say c:\a\abc.txt to c:\b\abc.txt. I used the following below code #include <stdio.h> #include<fstream> int main() { if ( rename("c:\a\abc.txt","c:\b\abc.txt") perror( NULL ); system("pause"); return 0; } when i ran this code, the original file in the folder "a" gets deleted. … | |
Ok So Im writing a program to setup another program... And now Im stuck cuz I want make "my program" click the next button on the "setup" and then I want it to click the radio buttons on the "setup" program... how would I got about being able to send … | |
Hi, [? 1] How do I create an API for a game? [? 2] If this subject is too hard for a novice/intermediate programmer, where do I best find tutorials/resources about API's? [1] I asked myself this question, as well as google, yet no easy answers or explanations popped up, … | |
Hello, and thank you for taking the time to help me with this! I am working on a program that keeps information about staff members, such as volunteers and employees. The problem I am having is that when I run the program (everything compiles fine), I enter a members, and … | |
------------------------------------------------------------------------ Item No. Cost Quantity Amount ------------------------------------------------------------------------ 1 40.00 1 40.00 2 150.00 10 1500.00 3 2000.00 20 40000.00 4 10.00 10 100.00 ---------------------------------------------------------------------- Total 41640.00 | |
Having decided to brush up on my programming, I wanted to try and make a Yahtzee game, only console based. It is object-oriented for the most part. My trouble is with generating different numbers for each die. I will post my Dice class to help show what I am doing: … | |
Hi. (If you don't feel like explaining, please tell me what I need to read up on. Derived classes? Polymorphism?). I have got this assignment from school, in which we are handed a main.cpp file and we are supposed to write the class for it. But there's a few thing … | |
What's the simplest way of being able to build Qt Applications using C++? notepad? specific IDE? HOW do I do it? Can someone PLEASE walk me through it. I found instructions online for integrating MS Visual C++ with Qt. I ended up taking 5-6 hours out of my time to … | |
Hi guys, Please can someone explain me how would I split a string into groups. In other words, I have a string of numbers, as such: 123456789 I am supposed to store them in linked list nodes as such: node 1: 1 node 2: 2345 node 3: 6789 I was … | |
can u pls tll me the main difference b/w base class libraries f c# n library functions f c & c++ | |
id like to write a function that checks if an object's variables have been changed. the only way i can think of is to create a duplicate object and compare each variable. im really lazy, and this seems like alot of effort. can anybody help me think outside the box? … | |
Yes I know its a long code and it will get longer but there is a compiler error in the [COLOR="Green"]int main ()[/COLOR] First Visual C++ 2008 Express edition error [QUOTE] ------ Build started: Project: MAC ADDRESS, Configuration: Debug Win32 ------ Compiling... MAC ADDRESS.cpp warning C4603: '_WIN32_WINNT' : macro is … | |
Hi, I have class which has two bool vectors: [CODE] typedef vector<bool> my_bool_vector; class MyClass{ private: my_bool_vector bvec; my_bool_vector another_bvec; public: explicit MyClass(unsigned int size) : bvec(size, false), another_bvec(size, false) { } }; MyClass MyObject (10); [/CODE] I want to be able to access bvec and another_bvec in the following … | |
Please, I'm not sure about this exercise, if someone can help me, thanks! I know it's something about .find() or .size(). and return the variable. Here is the exercise: ______ Write the code that prompts the user to enter a home web page address of the website that is used … | |
Hello, I created a new maskedtextbox and gave the mask property the value 000.000.000.000, which should act as an IP address box. Now, when I open my configuration panel and configure my IP address, it jumps to the next mask while pressing the . key. Is there any way to … | |
Can anyone tell whats wrong in below code? I m learning c++ ..so maybe this ll be very easy solution for you guys[code]Hello i m learning c++ ..so maybe this ll be very easy solution for you guys #include<iostream.> #include<conio.h> void main() { int a,b,c; clrscr(); cout<<"Enter Your 1st Value"; … | |
#include <stdio.h> #include <math.h> #define PI 3.141593 // prototype of function to find the great circle distance between two points double gc_dist(double, double, double, double); int main(void) { double lat1, long1, lat2, long2; printf("Enter latitude north and longitude west "); printf("for location 1 : "); scanf("%lf %lf", &lat1, &long1); printf("Enter … | |
hi friends, I am an amateur C++ programmer... I am using turbo c++ V4.5.. after reading about the google code breaking thing on the internet, i became interested in simple substitution cipher.. the one using a keyword..I know the logic behind the program. yet I need your guidance about execution … | |
Hi all. Could anyone give me a pointer please? I've almost finished a project I'm working on but have one last issue to resolve. I have an image on a form that I apply a colour gradient to. However, when I grab this to create a bitmap (this.DrawToBitmap(BackGroundBmp, BackGroundRect);) I … | |
Hi, I want to split a char string. We can use “strtok” function for split a string by using token. But in my problem, there is no specific separation/token between each value. The data directly come from an external device through the serial port. I used “ReadFile” function to read … ![]() | |
Hi As part of a project, I am required to create an interactive 3D immersive world using whichever method I want. I'm thinking about making the world/map using UnrealEd 3.0, but wondered if this limits me in what I can do. I want to be able to talk to NPCs, … | |
I want to be able to extract the file info of music files(title, artist, album, genere, ect.) and then rename the file to the title of the music track. But I don't know anything about this and have no idea where to start, can someone tell me? ![]() | |
How would I be able to iterate through each character in a file? The file is of type ifstream. ![]() | |
Hi frndz... here's my doubt.. if i pass a decimal or hexadecimal integer to a function from my main function..and then have to decide in that function whether the argument is a decimal or hexadecimal value..how shud i go bout it?? for ex: int main() { int count=2; int x[]={0x620058, … | |
hi , i'm new in programming world i want to write c++ class in c it was ok .. when i change to c++ i've problems [CODE] #include <iostream> using std::cin; // using std::setprecision; using std::cout; using std::string; using std::endl; // using std::streamsize; class STD1{ int id; string name ; … | |
hi Write an overload function "searchArray" so that it takes an array "ary" of int or char, and additional argument, namely "valu" with type as same as the "ary". A call to this function will return the index of "valu" within "ary" or -1 if it does not exist. and … | |
Thanks for the help earlier, I fixed the problem i had earlier in nested loops, but now i need help creating a Do/While Loop that is a loop above all the steps above that ask the user to continue y or n and quit unless they enter y. i know … | |
This is anothe exercise I got, but I haven't done anything just because I need how to get the code, as if I would write it in a piece of paper: _____ Write the code that prompts the user to enter two integer numbers, numerator and denominator. Your program should … | |
I'm designing a game "Battleship" and I can't get get rid of a syntax error in the header file. I'm using a 2-D array for my grid. The error is: error C2059: syntax error : '{' The error seems really simple, but for some reason i can't get rid of … | |
Please, can someone help me in this exercise, because I really don't know too much about swaping!... _____ Write the code that swaps the value of two int variables. Then round both variables to the nearest tenth. example: (If[B] x[/B] contains the value of 43 and [B]y [/B]the value of … | |
Please, can someone help me in this exercise, because I really don't know too much about swaping!...I dont need to write the whole code, only a part of it when it's shown how I swap and round them... _____ Write the code that swaps the value of two int variables. … | |
I have been to writing an algo composing program to generate Midi sound with specific given pitch and duration etc. vegaseat's Code on midi helped quite a lot, it plays a line of melody of midi voice with given pitch and sound. The problem is, I need to have multiple … | |
Hi, I'm new to this programming stuff and I'm going through Beginner's Guide by Herbert Schildt. In Module 4 Critical Skill 4.1 Use one-dimensional array. #include<iostream> using namespace std; int main() { int sample[10];// this reserves 10 integer elements int t; // load the array for(t=0; t<10; ++t) sample[t] = … | |
[b][color=#990000]This program is copy & paste ready![/color][/b] [b]INTRODUCTION[/b] As the description of my topic says, I can almost taste the fruits of my labor. Journeying up, down, and around the Internet, I have searched, read, and studied various documents and tutorials to finally understand vectors enough to implement them into … | |
This code draws different shapes to the screen,(in this version, only a square or a cross. It will be updated soon!!). This code was written by a beginner, for the beginners!! |
The End.