49,761 Topics
| |
Hi, I have been trying for hours to solve this problem. I have attached below a very simplified version of my actual code. The constraints are: 1) the function "lib" cannot have its signature changed, as it is part of a library. 2) the pointer attribute "funcPtr" cannot be static … | |
I have to make an array of Nodes. I have #include "Node.h" as my header file and then in main I am writing the following code Node[] Node_array = new Node[]; but then I am getting errors referring to the above line: error C2143: syntax error : missing ';' before … | |
HI there, I've been trying to implement a class of a ball i was given by an tutor but am having troubles. She gave me: [B]TBall.h[/B] [CODE] class TBall { public: double _radius; // defines the radius of the ball TVector _position; // defines the position of the ball TVector … | |
helloo; i challenge all of the world programmers ;my question is; "Write a program that print all of the real number between 0 and 1"; :) :D :P chaleenge | |
[B]Here is the actual homework problem. I am stuck on parts 1 and 2 and I really don't know how to make this right. Any help is greatly appreciated.[/B] 1. Write a C++ program that reads following data from an input file called “in.txt”, And stores them to an array … | |
hey all im back as usual kicking my head ageist the door line 41 is giving me a compile error of "cannot declare variable sortItem to be of abstract type" just learning C++ inheritance its a bit different than java. thanks for all the help. Demo.cpp [CODE] /* File Name: … | |
I am trying to store a single random number from 0 to 99 to a variable. This is what I used in my code to do that: [code]time_t t; time(&t); srand((unsigned int)t); int rTSB(rand() % 100);[/code] I am trying to make a single random picture show up when you start … | |
Hey everyone. I have a question about trying to delete successive elements from an array. For example im trying to delete every other element. Lets say my size is 10, so my elements are 0,1,2,...9. Heres what I want my output to look like: 0 1 2 3 4 5 … | |
| Hi Everybody, I have succeeded in parsing the values I needed from a text file and storing them in an array. The script I've posted works as a function, but now I tried to put it in a class and I can't figure out how to define the constructor. The … |
could i get help with the syntex on reading a file to an array in c++. all the examples i see are more | |
guys iam new to c++ ,i even dontknow what are the tools to use develop c++ aplications so if sny body know tools like that (c# MS visual studio,java netbeans) pls let me know. and ma problem is i need to creat a link list on c++ .and i googled … | |
Consider a collection of songs in an MP-3 library where each song is characterized by artistName, songTitle, albumName, playTime (in seconds), musicCategory, and albumProducer – hence, you will need to use a struct data type to hold a song and an array of structs to hold the song collection. The … | |
ok i cam writing a class named fraction to add subtract multiply and divide fractions and it also compares them. This is my first time writing a class and also the operators are suppose to be overloaded. I think i did them right. I just need to figure out why … | |
I have command line c++ project for my final project of my course. I've decided to go a little further than the course intends and write a class for creating an uncompressed bitmap picture file. As an initial exercise I decided to create the 2x2 pixel bitmap example from Wikipedia. … | |
Hello. I'm just starting out in C++ and am trying to figure out how to split a users string input into individual words and then put each word into a slot in an array. I think it's going rather well, but I'm running into some problems, and it would be … | |
We got to get this to compile and I really need your assistance! I got sick last week and missed the lecture on these subjects and it took all night but here it is..... almost done.... but the assignment specs below say that it HAS TO COMPILE OR I FAIL! … | |
Hey Guys, I have a header file I downloaded for an application (actually about 20 header files). Most of them can be opened fine, but I get errors on a couple that say: [QUOTE]fatal error C1083: Cannot open include file: 'Transport.h': No such file or directory[/QUOTE] I've checked, and the … | |
Hey I have to write a program that will input the name of the text to be edited , name of the file that will hold the edited text, the data to be replaced (data1) and the new data which will replace the old (data2).All occurrences of the data1 to … | |
I have recently started to write my own tiny little electronic-book. This e-book is not about teaching C++ from ground up, but it is a collection of C++ pieces that I have learnt during these past few years that I want to share with everyone. I call this e-book "[B][I]C++: … | |
i need ur help sir i m asked to develop a small educational software package using c++ package must be a set of 5 multiple choice questions answers to which will be correct nearly correct wrong obviously wrong on completion of the test core must be displayed.... plz help me … | |
| #include <iostream> using namespace std; int main() { int age; for (int i=0;i<5;i++) { cout << "Enter :"; cin >> age; } int *sum=&age; for ( i=0;i<5;i++) { cout <<*(sum+i) << endl; } return 0; } here is one of my program that i wrote. i do not know whats … |
Here is the code I have but it refuses to remove non letters,digits being read from a file line by line then each word in a line still what is wrong with it? [CODE]#include <iostream> #include <fstream> #include <string> #include <sstream> #include <algorithm> #include <cctype> #include <functional> #include "BST.h" using … | |
I have a Date class. In this class :(Date.h) [code]class Date { ... public: static Date creatDate (char *stringDate) .... };[/code] Date.cpp: I want to creat an array like this: [icode]stringDate[2][12] = {{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}, {31, 29, 31, 30, 31, 30, … | |
I am trying to establish TCP/IP communication between DSP(that runs Code Composer Studio, an IDE to compile and run C code) and Host PC(that runs VC++ application). While i am sending the data from CCS to VC++, "Retransmission timeout" occurs, and at another instance "Persist timeout" occurs which stops the … | |
Does anyone know how to add custom .dll and .h files to projects in Visual C++ 2008? | |
hi i have completed my project on disk scheduling using graphics & i am thinking of creating a little graphical user interface but i am confused on how to go about it.....(i have done my project on dev c++ using winbgim).....tell me how to create a less complicated graphical user … | |
Hello all.. Sorry because Im opening this stupid post.. The reason why I make this stupid thread because I need some advise and help for me the beginner.. I want learn how to create a programme.. I had download Microsoft Basic c++ 2005 about 3 months ago.. I surfing in … | |
Hey guys. I have a two part homework assignment. It involves reading a text file, creating a structure, and writing the results into a new text file. I have completed the first program and according to my TA it is 100%. My issue is I ran into a mental block … | |
I have to write this program that opens a file then sorts all these numbers in different ways. I plan on using the insertion method cause its one of the fastest, so that shouldn't be too difficult. But when you look at the text file its got spaces and numbers … | |
| I don't know what in the world I'm doing wrong but I'm sick of staring at my screen and debugging over and over again. It's been a while since I've used C++ so I'm a bit rusty. I'm working on a database project that is supposed to implement a hash … |
The End.