49,761 Topics

Member Avatar for
Member Avatar for moundeman

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 …

Member Avatar for Salem
0
1K
Member Avatar for achieve_goals

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 …

Member Avatar for achieve_goals
0
141
Member Avatar for thehivetyrant

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 …

Member Avatar for Salem
0
156
Member Avatar for #define

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

Member Avatar for jwenting
0
156
Member Avatar for ans025

[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 …

Member Avatar for ans025
0
201
Member Avatar for theABCasian

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: …

Member Avatar for theABCasian
0
5K
Member Avatar for slejeivw

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 …

Member Avatar for WolfPack
0
260
Member Avatar for Mustashimo

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 …

Member Avatar for Mustashimo
0
162
Member Avatar for Kevin_160

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 …

Member Avatar for mrnutty
0
2K
Member Avatar for timbomo

could i get help with the syntex on reading a file to an array in c++. all the examples i see are more

Member Avatar for Kevin_160
0
126
Member Avatar for chathuD

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 …

Member Avatar for Lerner
0
158
Member Avatar for pok.kys90

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 …

Member Avatar for Sky Diploma
0
232
Member Avatar for Jeff_5_7

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 …

Member Avatar for Banfa
0
253
Member Avatar for Gauntlet

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. …

Member Avatar for Gauntlet
1
138
Member Avatar for livestrong2431

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 …

Member Avatar for livestrong2431
0
784
Member Avatar for tinanewtonart

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! …

Member Avatar for peter_budo
0
2K
Member Avatar for Duki

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 …

Member Avatar for vidit_X
0
100
Member Avatar for sana zafar

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 …

Member Avatar for Ancient Dragon
0
172
Member Avatar for invisal

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++: …

Member Avatar for invisal
3
204
Member Avatar for sukhraj.buttar

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 …

Member Avatar for sukhraj.buttar
0
137
Member Avatar for kohkohkoh

#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 …

Member Avatar for peter_budo
0
142
Member Avatar for smoothe19

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 …

Member Avatar for mitrmkar
0
5K
Member Avatar for lagvino_els

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, …

Member Avatar for tkud
0
230
Member Avatar for suchithrac

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 …

Member Avatar for suchithrac
0
164
Member Avatar for Duki
Member Avatar for jonsca
0
98
Member Avatar for prade

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 …

Member Avatar for tonymuilenburg
0
75
Member Avatar for angel_banned

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 …

Member Avatar for tonymuilenburg
0
101
Member Avatar for MJaske

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 …

Member Avatar for MJaske
0
160
Member Avatar for swbuko

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 …

Member Avatar for msnata2001
0
213
Member Avatar for simonsayz27

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 …

Member Avatar for abhimanipal
0
138

The End.