49,761 Topics

Member Avatar for
Member Avatar for meaad.alhaddad

(A) Write a C++ program to sum all odd integers divisible by 3 in the range (X,Y). Integers X and Y are to be input by the user. Your program should validate that X is smaller than Y, and output error message if not. Note: Use whileloop for the validation …

Member Avatar for Schol-R-LEA
-1
100
Member Avatar for brand.lock

First off thanks for looking at this I have looked all over (both here and on the net) and tried several things trying to get this to work. I am using Visual Studio 2012 with DirectX (June 2010) SDK. I am attempting to write a fuctuin for sprite colission detection. …

0
76
Member Avatar for ktsangop

Hello everyone! I have a rather mysterious problem. I have a mfc dialog based application (running on win xp sp3), and at the same time another mfc app that installs a global keyboard hook capturing the ESC key (this one is always hidden). SOMETIMES when i press ESC key (with …

0
144
Member Avatar for nathaniscool99

Hello, I have been given a class diagram where a variable called light_years must be a const int and stored in the space class, but later on that value must be used in the main file. Below is the space class class space { private: static const int LIGHT_YEARS; public: …

Member Avatar for deceptikon
0
265
Member Avatar for daino

I'm trying to compile a project using Code::Blocks with a MinGW compiler (Windows XP). I have included the correct library file from boost and set the right include path but it doesn't seem to make any difference. Here's the error. The impression I'm getting is PdfContentsGraph class is not initializing …

Member Avatar for daino
0
395
Member Avatar for nuclear

I'm using fstream to read words from a file and I can't just read the whole word like so: ifstream ob("file.txt"); string word; ob >> word; But I need to somehow specify to read 20 positions, even though there might be just spaces included. So I was trying to do …

Member Avatar for vijayan121
0
184
Member Avatar for greatman05

So, I'm trying out a project on my own because I have no real clue how to do anything complex or useful in C++ (applications for example). This project calls for creating a simple console text editor with basic functionality (buffer, command set, redisplay). The problem is that I don't …

Member Avatar for mike_2000_17
0
1K
Member Avatar for vishalonne

Hello I am trying to connect MySQL database from C++ code given below- My development environment is - Window 7 CODE::BLOCKS 10.05 with minGW mingw32-g++.exe MySQL Connector C++ 1.0.5\lib\debug\mysqlcppconn.lib Up to compilation and linking every thing is OK I followed the tutorial [http://dev.mysql.com/doc/refman/5.1/en/connector-cpp-examples-complete-example-1.html](http://dev.mysql.com/doc/refman/5.1/en/connector-cpp-examples-complete-example-1.html) #include <stdlib.h> #include <iostream> #include <winsock2.h> /* …

Member Avatar for Ancient Dragon
0
341
Member Avatar for bops

I am planning on making a program to so that when it is excecuted it carries out the following procedure in 1 go... run command prompt ( system("CMD"); )...then use the command line to carry out the following command... "C:\Program Files\PowerMenu\PowerMenu.exe" -hideself on Im sure i have seen this done …

Member Avatar for Ancient Dragon
0
608
Member Avatar for ollie60

Hi I am currently making a dialog based application in visual c++ 2010 where a chart is going to plot data coming in from an external source. My issue is that I am unsure how to import that data in real time to my application. Does anyone have ideas? Thanks

Member Avatar for Ancient Dragon
0
332
Member Avatar for softwaretime

This program has taken roughly 3 months to develop and now I would like other people to evaluate it for me. It's called Math Tool and it can be useful for you're tring to find out an average of data (i.e. average time) and it's also useful to display it …

Member Avatar for softwaretime
0
208
Member Avatar for ben1996123

Input the minutes, then the seconds, and it will do the rest. Pretty simple but I just thought I'd post it. Made as a quick test for my game.

Member Avatar for PalashBansal96
0
291
Member Avatar for skiboy209

I thought i would share this with the community wrote most of it in school but the ai i wrote at home enjoy!

Member Avatar for PalashBansal96
2
251
Member Avatar for Carpetfizz

Hello! I'm terribly confused about how to pass a simple integer that was read from my main() to another function (in the same file). I know this is a really silly issue, but searching on the internet is just making me more confused. Here's my code so far. #include <iostream> …

Member Avatar for thendrluca
0
156
Member Avatar for jlillie

Hi, I have spent way to much time stuck on this with no clue how to do it. My program is a phone book directory. I'm writing a funciton that when the user enters a phone number to be deleted the program will delete that corresponding entries info. So it …

Member Avatar for jlillie
0
178
Member Avatar for saarthak pande
Member Avatar for pmphaololi

MOST WEB BROWSERS HAVE A HISTORY OF THE PAGES THAT USERS HAVE VISITED.WHEN FIRST THE USER ENTERS A WEB ADDRESS,IT IS STORED IN THE PAGES VISITED.WHEN THE USER CLICKS A LINK IN THE VISITED PAGES,THAT PAGE IS ADDED ON TOP OF THE PREVIOUSLY VISITED PAGES. THE USER CAN THEN PRESS …

Member Avatar for deceptikon
0
94
Member Avatar for Echo89

Well, I have just written all of this code, and then made lots of edits, compiled and when I run it, I get STATUS_ACCESS_VIOLATION. And I can't work out where the error lies. It is a very basic Database program BTW. Here is the code: http://pastebin.com/jLktEL3C And here is the …

Member Avatar for Echo89
0
808
Member Avatar for TexasJr

I made a test program to mess around with a feature I'm trying to put into my class project but I can't seem to figure out what I'm doing wrong. What I'm trying to do is to line up the numbers right of the decimal. this is my test source …

Member Avatar for TexasJr
0
148
Member Avatar for anukavi

Hi, In Dialog based MFC code (VC++ 2012), I have two command buttons and 1 Text Box 1. Enquire 2. Start Once the user chooses ENQUIRE Button, I display msg in TextBox "Press START for the ....." In the Start Button code, I do the socket opening,accept functions etc while …

Member Avatar for anukavi
0
318
Member Avatar for spacebro

Trying to make a little space exploration game, and I'm just testing some planet data stuff, and it won't work. I don't get any errors until I compile it, then I get an error message saying that "vector subscript" is out of range. main.cpp: #include <iostream> #include <conio.h> #include <string> …

Member Avatar for Ancient Dragon
0
147
Member Avatar for yupitsme

How do I keep a timer running in the background in my program? I'm making a game and I need to time the player.

Member Avatar for Ancient Dragon
0
53
Member Avatar for jackshannon4

shader.vert: #version 120 varying vec3 position; varying vec3 normal; void main() { position = (vec3(gl_ModelViewMatrix*gl_Vertex)); //get the position of the vertex after translation, rotation, scaling normal = gl_NormalMatrix*gl_Normal; //get the normal direction, after translation, rotation, scaling gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; } shader.frag: #version 120 varying vec3 position; varying vec3 …

Member Avatar for jackshannon4
0
172
Member Avatar for StNtMaN

**C++ Code:** #include <iostream> using namespace std; int sum(int n) { if (n <= 0) return 0; else return n + sum(n-1); } int main() { cout << "Range num? "; int num; cin >> num; cout << sum(num) << endl; return 0; } **My Pep/8 try at it:** br …

0
65
Member Avatar for Carpetfizz

Hello, I'm working on a text base space game, just for fun, and I've made a lot of progress. The problem I'm having right now is that sometimes, the psuedo-random is calculated out of its modulus. The way it works, as you can see in the code is that a …

Member Avatar for Carpetfizz
0
146
Member Avatar for hur1214

[CODE] #include<iostream> #include<fstream> #include<string> using namespace std; struct phonenode{ char surname[15]; char initals[4]; phonenode *next; }; phonenode *start_ptr = NULL; phonenode *crrnt_ptr; void read_txt(){ ifstream ifs("test.txt"); char surn[15]; char inital[4]; phonenode *temp1, *temp2; temp1 = new phonenode; if (ifs.fail()){ cout << "ERROR" << endl; } while(ifs.good()){ ifs>>surn>>inital; if(ifs.fail()){ break; } …

Member Avatar for kjr247
0
6K
Member Avatar for vishalonne

I want dynamically define an array b in input() I'm trying like this where int size=9; int b*=new int[size][size] But getting many error while compiling Thank you for any guidance Regards

Member Avatar for deceptikon
0
139
Member Avatar for pars99

Can you please help me and tell me what I am doing wrong? I have been looking at the program for two hours and need help. I keep getting this error: 'triangle' was not declared in this scope. Also, that is the only error, so I don't have anymore. Thank …

Member Avatar for pars99
0
2K
Member Avatar for sddq_bll

i Need to create a Menu Driven program ..but cant understand what it is ..some one help me out and explain me .

Member Avatar for amrita111
0
268
Member Avatar for Vegito1991

This is my code class AddResult { private: string ar_stu_id, ar_mod1, ar_mod2, ar_mod3, ar_mark1, ar_mark2, ar_mark3; public: void addresult(); AddResult(string, string, string, string, string, string, string) { cout<<ar_stu_id <<" " << ar_mod1 <<" " << ar_mod2 <<" " << ar_mod3 <<" " << ar_mark1 <<" " << ar_mark2 <<" " …

Member Avatar for Vegito1991
0
123

The End.