49,761 Topics
| |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
**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", … | |
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 … | |
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? | |
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 … | |
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 … | |
#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>> … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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++? | |
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 … | |
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 … | |
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 … | |
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 … | |
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] … | |
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 … | |
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 … | |
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 … | |
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 ; … | |
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 … | |
| |
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 … |
The End.