49,757 Topics

Member Avatar for
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
183
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
286
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
795
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
146
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
314
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
Member Avatar for Shft

Ok, away from my last endeavor, I don't know if you have ever herd of "Active@ Password Changer" (if not look it up), It is a BIOS bootable program that allows you to change many of the windows user's properties, such as: Clear the password, lock the account, change logon …

Member Avatar for Echo89
0
156
Member Avatar for Jbvo

I am trying to read each word from a file and put it in a pointer then send it to a vector. Here is what I have so far. I am having a hard time sending the data to a function where I will add it to a vector. Here …

Member Avatar for Mephesh
0
154
Member Avatar for fishsticks1907

Hello, I'm making a linked list and when i try to make a member function to return a new object i keep getting an error reading: "‘node’ does not name a type". I think im writing the function wrong, any help would great. #include <iostream> class list { private: class …

Member Avatar for fishsticks1907
0
160
Member Avatar for CodyM

Im getting errors that i don't understand how to fix, any help would be greatly appreciated! >C:\MinGW\bin\g++ -pedantic -Wall -Wextra A9COPY.cpp -o A9COPY.exe A9COPY.cpp:36: error: expected constructor, destructor, or type conversion before '*' token A9COPY.cpp:44: error: expected unqualified-id before "void" A9COPY.cpp:44: error: expected constructor, destructor, or type conversion before "void" …

Member Avatar for mrnutty
0
194
Member Avatar for AbaianitCristian

I'm calling a c++ project from c# , the process is like this , i enter some numbers in a textbox and when i push a button it calls a c++.exe program and run it with the numbers i've inserted in texbox ,after this return the result in another textbox. …

Member Avatar for BobS0327
0
201

The End.