49,761 Topics

Member Avatar for
Member Avatar for foco

Is it possible to return values from a shell prompt back into c++ as a variable? IE: If I have the line [ICODE]system("cat *txt");[/ICODE] I am unable to store any of the results within my c++ program. Thanks!

Member Avatar for daviddoria
0
55
Member Avatar for freemanirl

So, I made this function to return data from the registry. I'm going to be calling different things from different places to get hardware information. Unfortunately, it works the second time you call it. Here is the output: Could not find value: Identifier Returned: ?? Returned: x86 Family 6 Model …

Member Avatar for freemanirl
0
228
Member Avatar for Spiderpig085

Hey guys, just wonderin why I am getting a compiler error on this code... I've had this error before and spent ages tryin to fix it.... But i can tfor the life of me remember... Thanks to all who reply...:) [ICODE] class Date { public: Date(); private: }; class Time …

Member Avatar for Spiderpig085
0
95
Member Avatar for deanus

Hi, can anyone tell me how to access a specific memory location in C++ (I use Dev-C++ 4.9.9.2) without the OS giving me an error and stopping the execution of my prog? I've tried the following code on both WinXP and Win98, but they both gave me an error : …

Member Avatar for deanus
0
221
Member Avatar for daviddoria

Some of you may have noticed that I am always harping about "abstracting the problem" and "posting the smallest compilable piece of code that demonstrates a problem." I rambled a bit about why this is important if anyone cares to read: [url]http://daviddoria.blogspot.com/2010/05/problem-abstraction-helping-others-help.html[/url] Dave

Member Avatar for Ketsuekiame
0
88
Member Avatar for weaponx69

Hello all, I'm am trying to get this program to work for class tomorrow. Maybe someone would be kind enough to be able to check it out for me. I'm using the g++ compiler in Ubuntu trying to get this openGL application to work. It compiles fine but has a …

Member Avatar for weaponx69
0
124
Member Avatar for ARKaMAN

Hi I have The following code [CODE]// This is the weapon ban list. Anything here will be taken away from the player. isValidWeapon(weapon) { switch(weapon) { case "gl_ak47_mp": case "gl_m16_mp": case "gl_m4_mp": case "tavor_gl_xmags_mp": case "none": return true; } return false; } // This Checks right away at spawn. ARKaMAN …

Member Avatar for Ketsuekiame
0
191
Member Avatar for theABCasian

trying to figure out the reason for memory loss any ideas would be helpful requirements should be done however i need a working file for turn in thanks for help. leak seems to be around line 59-61 i think in demo.cpp Demo.cpp [CODE] /* File Name: Demo.cpp Chapter No. 15 …

Member Avatar for Ketsuekiame
0
265
Member Avatar for new2programming

i have been following this tutorial. However when i try and run it i get these errors: I cannot see why i am getting them.. [ICODE]1>------ Build started: Project: Ninja Wars, Configuration: Debug Win32 ------ 1> Playstate.cpp 1>c:\documents and settings\louisa\my documents\visual studio 2010\projects\ninja wars\ninja wars\playstate.cpp(8): error C2259: 'PlayState' : cannot …

Member Avatar for Ketsuekiame
0
156
Member Avatar for jwelsh

First let me just say that I'm a student seeking help on an assignment, but I am not asking for anyone to just hand me the answer. I am asking for help on understanding how to solve this problem. I'm stumped, and I don't quite understand it. I've done a …

Member Avatar for jwelsh
0
844
Member Avatar for chialoo

The two characters (one, two) have the same values generated. How can I make them have different numbers generated? Currently, the out put is: "The character has 2 eyes, an age of 66, and 8 legs. The character has 2 eyes, an age of 66, and 8 legs." I want …

Member Avatar for WaltP
0
125
Member Avatar for trevs234

im having trouble creating a random number generator (like say a dice rolling game) if anyone could possibly show me some code for a random number generator that would be greatly appriciated :mrgreen:

Member Avatar for WaltP
0
228
Member Avatar for steventaal

I have written this for my math class, as it saved me an accumulated time of three hours over a week of homework that involved the quads. I a posting it here for anyone who wants to use, modify or otherwise use to go ahead and do so. Standard Quadratic …

Member Avatar for anuragcoder
0
256
Member Avatar for abhayj2000

Hi, I am currently developing a program in C++ which detects path to super node from a simple node in a ring type topology. My requirement is that I need to traverse from simple node to super node and highlight all the possible paths which are going to super node. …

Member Avatar for abhayj2000
0
106
Member Avatar for pinkey

write a c++ program for doing string searching? the assumptions: 1.the progeam should read an arbitrary text from a text file. the name of the file should be read from the user. 2.the size of the text (num of lines and num of characters in each line is arbitrary. the …

Member Avatar for chiwawa10
-2
292
Member Avatar for new2programming

Hi i am having issues getting a background image displayed in a screen. I have tried a few tutorials but to no advail. If you could help i would be greatful :) I am using Visual C++ with SDL

Member Avatar for daviddoria
0
81
Member Avatar for D4n1sD

Well I been searching for 2 days on google, and on every search machine till ressults page 20 and I had nothing. I believe that I was searching with the wrong keywords thats why I came here. I got a GUI coded into C++ and I got a button into …

Member Avatar for daviddoria
0
63
Member Avatar for Brokenpwn

Hello, I've been having this error come up whenever I try to compile this code: [CODE]#include "stdafx.h" #include "Strides.h" int m_Stride; bool chams = true; bool onetime = true; int main(); { if (chams) { const BYTE bRed[60] = //red { 0x42, 0x4D, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, …

Member Avatar for Brokenpwn
-1
454
Member Avatar for moonL!ght

hi every one; i saw this question and im trying to solve it.\ baseically i have to matrix's which each element is afraction so i must declare a class that has in the privet to float members numerator and denomnator and in the public i have constructer function to inilize …

Member Avatar for moonL!ght
0
248
Member Avatar for hatzi8

I need an advice about the algorithm I have to use in order to find and return the shortest path in a graph like the one I uploaded. I'm lloking for the shortest path between two points, the lower left and the upper right. Thanks

Member Avatar for Sodabread
0
88
Member Avatar for gregarion

Hey guys , im having a problem writing into a file. Basically ,i have a program which read an input from one file , and then calls it to the function of another method. Here is how my program looks like. [CODE]using namespace std; class Team{ public : void Readfile() …

Member Avatar for gregarion
0
112
Member Avatar for boiishuvo

Firstly I want to show you the code and it can run properly: You may copy each file and paste them into a C++ software and run it please. [B][U]Trader.h file[/U][/B] [code] const int NumSeller = 1; const int NumBuyer = 1; const int NumBids = 10; const int MinQuantity …

Member Avatar for abhimanipal
0
107
Member Avatar for merse

I have a code including [CODE]#include <iostream> #include <iomanip> #include <fstream> using namespace std; [/CODE] And it works with MinGW under XP. I want to compile the same code under Suse linux, but compiler said that for example: atof(), error() functions are not defined. The problem solved if I include …

Member Avatar for Narue
0
674
Member Avatar for freemanirl

Okay, so I've been looking at this for quite some time. I think I know what the problem is, but my C++ skills are sad a best due to stuff like Java, C# and VB. So, I'm trying to pull information from the registry, and I have no problem getting …

Member Avatar for freemanirl
0
198
Member Avatar for sami alzahrani

Given the following declaration and definition char a[20]; and using only pointer notation, write a program to read characters from the keyboard to fill the array and print them out.

Member Avatar for Sky Diploma
-1
61
Member Avatar for rajayuvaraja

HI I am learning multi-threaded programming. I have written the following code to synchronize access to a common array by two different threads. One thread to fill values in the array while the other one reads values from that array. The array is placed as member of a class and …

Member Avatar for Ancient Dragon
0
195
Member Avatar for GlaDiuS89

Hi guys. So, i'm suppose to make a translator, here's my form: [URL=http://img213.imageshack.us/i/12081833.jpg/][IMG]http://img213.imageshack.us/img213/6067/12081833.jpg[/IMG][/URL] When i press the middle button i have to check every word from left memo (MEMO1) and insert the translated word in the memo on the right (MEMO2). So my middle button has the following code : …

Member Avatar for daviddoria
0
431
Member Avatar for Akatosh

I have read in a lot of books that for every "new" you must use a delete....But in some books I have been currently reading they don't bother deleting their pointer to a class. I have read it is required at cplusplus.com to delete a pointer to a class but …

Member Avatar for WilliamHenry
0
137
Member Avatar for jimJohnson

I need to write a declaration for a polynomial class where data members are an integer for the degree and an array for for the list of coefficients and with basic operations of input and output....and then implement the input operation.... Here is what I have class Polynomial { public: …

Member Avatar for iamthwee
0
170
Member Avatar for anuragcoder

How do i call another c++ code or an *.exe application in another cpp code. I actually wanted to create an AppSuite which contains an editor, a web browser, an address book etc. How to include all apps in one menu?? Any help will be appreciated, Anurag

Member Avatar for iamthwee
0
82

The End.