49,761 Topics

Member Avatar for
Member Avatar for txhornsfan

I am having problems with my code. I think it is the print function, but I'm not sure. Everything compiles correctly. Just no output. Any help is appreciated. Thanks Here is what I have: #include <iostream> using namespace std; struct node* tree = NULL; struct node { int data; struct …

Member Avatar for Lucaci Andrew
0
218
Member Avatar for phorce

Hello, I'm currently working on a project that basically reads some text and then performs basic Lexical Analysis on the text. I'm having a slight problem with overloading methods. So for example, I have a method that can read in the words from a txt file and another method which …

Member Avatar for phorce
0
181
Member Avatar for poloblue

Good Afternoon, I'm having problems with my school assignment that is about a loan program. Here are the details what the program needs to do. You are required to write a loan program for the Rio Grande Bank. This program will print an amortization table for a loan, given the …

Member Avatar for poloblue
0
7K
Member Avatar for Remy the cook

I am new at coding. I wanted to read from a file(text) and then write it to another file many times so that the file I write to becomes as large as 20MB..I read Harry Potter book for that....the code works just fine for 1000 lines etc..the file is read …

Member Avatar for Remy the cook
0
177
Member Avatar for Monster99d

I have an error called Unexpected Token 'class', did you forget a ;? I have no clue what is going on. Maybe you guys can help me out. The codes name is Player.h. The error is on line 9. #ifndef PLAYER_H #define PLAYER_H #include "Weapon.h" #include "Armor.h" #include "Monster.h" #include …

Member Avatar for Monster99d
0
4K
Member Avatar for jonnyboy12

Hello i am using a web browser control in my program with ms visual. I use the web browsers internal functions to do things like, cut, copy, select, CreateLink....It looks like this. this->webBrowserBody->Document->ExecCommand("CreateLink", false, nullptr); ............ Ok, that will bring up and insert link dialog. The dialogs are blank in …

0
82
Member Avatar for Dudearoo

**Dudearoo** *Useing Code::Blocks* Hey you guys! ive got a problem with a 'test' program i have made for saveing strings. heres the code: #include <iostream> #include <cstdlib> #include <stdio.h> #include <time.h> #include <conio.h> #include <stdlib.h> #include <iomanip> #include <windows.h> #include <fstream> using namespace std; int main() { ofstream myfile ("savefile.txt", …

Member Avatar for Dudearoo
0
138
Member Avatar for lewashby

I'M working my way through a C++ book and now I'M doing a card deck program. Here's the line I'M having trouble with. r = card % 13; // r = random 0 to 12 card in this case is just a random int number from 0 to 51. 52 …

Member Avatar for TrustyTony
0
164
Member Avatar for merse

I would like to use an unsigned integer type for indexing a vector, but I want to use the best and optimal on every platform. How to implemet?

Member Avatar for L7Sqr
0
123
Member Avatar for XodoX

I think this has something to do with process scheduling. (1st process) Start 0// starts at 0ms Run 10 // runs for 10 ms Disk 0 // no idea what this does, but it takes 10 ms Run 30 // run 30 ms End // terminates (2nd process) Start 5 …

Member Avatar for asrockw7
0
191
Member Avatar for RonKevin

Okay, its been a while since my last visit here..and yes I need your help with C++ Programming... My grades were fine so that's all thanks to you guys....so here's my next question.... What is wrong with my code? My exponent displays a wrong number... I used a for loop …

Member Avatar for RonKevin
0
315
Member Avatar for lewashby

#include <Stdafx.h> #include <iostream> #include <stdlib.h> #include <time.h> #include <math.h> using namespace std; int rand_0toN1(int n); int hits[10]; int main() { int n; int i; int r; srand( static_cast<unsigned int>(time(NULL))); // set seed for random numbers cout<< "Enter number of trials to run "; cout<< "and press ENTER: "; cin>> …

Member Avatar for VernonDozier
0
167
Member Avatar for laura90

I'm trying to write a simple linked list program. The header files are compiling successfully, but when I try to compile my driver program to test the program, I'm getting an error. Here's my driver program: #include <iostream> #include "Node.h" #include "List.h" using namespace std; template <typename T> void fill(List …

Member Avatar for mike_2000_17
0
379
Member Avatar for boris90

Hi, I need a program to search all lines of a file (a whole file) for a certain string. In my concrete case, I need it for login. Let me sum all of this up, so you get the whole overall point of what I have so far: - a …

Member Avatar for Moschops
0
656
Member Avatar for blitzkrieg64

I'm trying to access the pixel colors from a image file but can't seem to get it to work properly, my program is only accessing the pixel colors from my active window. I've been stuck on this for a few days and would really appreciate any help. I'm guessing i …

Member Avatar for Moschops
0
281
Member Avatar for new_developer

hi everyone, I am trying to initialize array in main method, and insert value in array in another method named "popArr()", in last print array in "printArr()" method. But its not working and i am getting errors. The environment i am using borland c++. The code is as follows. #include …

Member Avatar for Lucaci Andrew
0
164
Member Avatar for godzab

Here is the code first: People.cpp #include "People.h" #include "Birthday.h" #include<string> #include<iostream> using namespace std; People::People(string x, Birthday bo) : name(x), birth(bo) { } void People::People() { cout << name << "was born on" << birth.printDate(); } People.h #ifndef PEOPLE_H #define PEOPLE_H #include<string> #include "Birthday.h" class People { public: People(string …

Member Avatar for triumphost
0
131
Member Avatar for Qusto

Hi! Created application is working toooo slow, looks like there are a lot of memory leaks, there are a lot of pointers. So, please, can you advice some effective tool for run-time errors and memory leaks detection in Visual Studio C++?

Member Avatar for Topiary
1
150
Member Avatar for ztdep

Dear friends: i have a data file, the structure of the file is as follows: // data.txt $Elements 1 1 2.5 2 2 1.0 2.0 3 2 3.0 4.0 4 4 1.0 3.2 2.7 1.6 $EndElements In the data.txt, the fisrt column is the row number, and the second column …

Member Avatar for Branickiod
0
111
Member Avatar for sniper29

how can i make an array inside by a function????? so that the value i will input will change.... I am using Borland C++..... how can i start it???? 1. [SOLO] Write a program that uses a two-dimensional array to store the highest and lowest temperatures for each month of …

Member Avatar for YoDjinthehouse
0
589
Member Avatar for ASFtlink

This program ask user which arithmetic operation they want to play with then generates a random equation and lets the user answer it. When the user stop playing the game the program calculates the number of correct and answers and wrong answers. I need some help because the program crashes …

Member Avatar for Lucaci Andrew
0
310
Member Avatar for poloblue

Good Afternoon, I'm getting this errors on the program: warning C4244: 'argument' : conversion from 'double' to 'const int', possible loss of data warning C4244: 'argument' : conversion from 'double' to 'const int', possible loss of data warning C4244: 'argument' : conversion from 'double' to 'const int', possible loss of …

Member Avatar for Schol-R-LEA
1
1K
Member Avatar for dan_code_guru

Ive just recently switched to visual studio c++ express. I am Creating some shapes with dx9 and i came upon this problem with my indices: error C2064: term does not evaluate to a function taking 24 arguments here is the code where i am getting the error: [ICODE]short indices[100]; indices[100] …

Member Avatar for dan_code_guru
0
776
Member Avatar for MrEARTHSHAcKER

Hi, I need little help with using MediaPlayer from System tab in Borland Builder 6 for C++. Does anyone know what member function of MediaPlayer returns bool variable which tells us is music currently being played or not? I have seen solution for this problem where we use Timer which …

0
119
Member Avatar for infinityblade

Hey guys, So I really need help writing a c++ program that is supposed to read in values for Red Green and Blue colors between 0 and 255, and then use a different function to convert them to Cyan Magenta Yellow and blacK color using set formulas. 1. Write a …

Member Avatar for triumphost
0
3K
Member Avatar for rbean10

I am creating a program to decrypt the line of code ":mmZ\dxZmx]Zpgy" with ASCII method. What I have so far translates individual characters perfectly. But I can't seem to translate whole lines/words. Everyway I've tried gives an error somewheres. I think I need to use cstring or string. Any tips …

Member Avatar for Moschops
0
562
Member Avatar for akshay.lahiry

Hi Guys I am trying to create a global object instance and am currently running into a segmentation fault while accessing a member variable. I have a capture.h file and a capture.cpp file //In capture.h struct ringinfo { // a simple struct }; class capture_manager{public: func1(); func2(); ringinfo ringinf ; …

Member Avatar for akshay.lahiry
0
3K
Member Avatar for lightningfire

I am trying to learn C++ and am trying to figure out how to use strings and if statements together. Here's the code I'm trying to play around with: [CODE=c] #include <iostream.h> int main() { char * a; cout << "Do you want to enter?\n"<<endl; cout << "To enter, type …

Member Avatar for sftranna
1
11K
Member Avatar for chamnab
Member Avatar for Perry31
0
216
Member Avatar for poloblue

Good Afternoon, I 'm new to C++ programming, and I have to do a program that deals with nested loops. Can anyone please check the code that I have for PART C and PART D of the program. Here is the code of the program. #include <iostream> #include <fstream> #include …

Member Avatar for TrustyTony
0
211

The End.