49,761 Topics
| |
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! | |
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 … | |
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 … | |
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 : … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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: | |
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 … | |
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. … | |
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 … | |
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 | |
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 … | |
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, … | |
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 … | |
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 | |
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() … | |
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 … | |
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 … | |
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 … | |
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. | |
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 … | |
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 : … | |
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 … | |
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: … | |
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 |
The End.