49,761 Topics
| |
Hey, I was wondering how (if it's even possible) to create my own compiler directives. Any help? | |
Hello, I'm learning C++ and i was trying to use the [i]zlib[/i], but i'm getting some errors when trying to compile my little project. Here is the code: [code=cplusplus]#include <string> #include <stdexcept> #include <iostream> #include <iomanip> #include <sstream> #include <zlib.h> using namespace std; std::string compress_string(const std::string& str, int compressionlevel = … | |
Is it possible to compile a single .cpp (not a project) in visual studio 2008? Also will using visual studio cause problems executing code on a unix system? I am making my first c++ "hello world" program and I am attempting to use visual studios. Am I going to have … | |
I need to return the size of a doubly linked list and I am having trouble thinking of the logic to go about doing this. template <class T> int List<T>::size() const Returns the current size of the list; i.e., the number of data items currently stored in the list. Since … | |
i have a problem of geting a square root in c++ using (cmath) | |
I am doing a fuction where I want to check that a String contains only Letters between: "A-Z" and Numbers between: "0-9" and "_" Instead of checking all one by one. Is there any approach to check against all at the same time ? [code] String ThisString= TextBox1.Text.Trim().ToLower(); for (int … | |
Ok, I have been busting tail trying to get this simple project done. Lesson learned is do not take a break from course work during the summer, my lack of fundamentals at this moment is tear me apart. I am determined to finish this project ahead of time to finish … | |
Hey, Im having a problem with this programm. It is supoused to have a vetor (pila) that would store all the elements on the try block. When it gets to the "666" element (at the end of the try b lock) it is suppouset to throw an exception (pilallenaexception) but … | |
i need help writing a program that includes a function that computes future investment value at the given interest rate for a specified number of years. I have started out but do not know what to do next to get this program to work. here wut i have #include <iostream> … | |
Task: Write a function called DisplayEmployeeRec() that takes EmployeeRec as a parameter and displays the value using the following format: NAME: ID: PAYRATE: HOURS WORKED: GROSS PAY: This is what I have so far: [code=cplusplus]#include <iostream> #include <iomanip> #include <string> using namespace std; struct EmployeeRec { string name; string empId; … | |
my application uses a static vector which is defined as a member variable of a class. When i try to close my application then it dumps a core . On analyzing the core ,it is pointing to the static vector initialization. I am running my application in red hat 5.3 … | |
Hi! Can you tell me, how to pass a reference to the column in 2d vector to function with following declaration: [ICODE]void SetData( const std::vector<float> &xs,const std::vector<float> &ys); [/ICODE] This function is from wxMathPlot. My vector's declaration looks like this: [CODE=CPP]vector<vector <double> > sekce(8); vector<vector<time_t> > cas_t_all(8);[/CODE] I would like … | |
I am new learner and I copy the exact code from book and run the following code . this code for MDI sample program my PC is XP system [code]//--------------------------------------------------------------------------- #include <vcl.h> #pragma hdrstop #include "ViewMain.h" #include "MDIChild.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TMainForm *MainForm; //--------------------------------------------------------------------------- __fastcall TMainForm::TMainForm(TComponent* Owner) … | |
hi There, I am currently developing an application which, in part of it, I have to enumerate all the windows 7 libraries and their data (Files & Folders). Currently I've been able to fetch the Included folders of the standard Windows libraries using the SHLoadLibraryFromKnownFolder function. However, this functions needs … | |
I am using CodeBlocks c++ compiler. I want to generate 11 digit random number as i am working on my computer project. How can i do this? and everytime a new random number. | |
how do I set the value of x to 2 and y to 3? here is my code so far [ICODE]#include <stdio.h> int main(void) { int x; int y; printf( "%d", x ); return 0; }[/ICODE] thanks for any help. | |
First of all, let me say this. I just started object oriented programming in college and I am already way ahead of the subject matter being taught. Wow, that came off as cocky, I mean this is not one of those OMG my homework is due tomorrow type situations. So … | |
Hi, I'm trying to write some code that will validate if we are trying to write to nfs and if so, complain. From what I've read, the stat() call populates the st_dev with value of the file system type. On an nfs mount it tells me that it's '14'. I'd … | |
I'm using a new book this semester for my datastructures class and apart from the bad writing, he has come pretty confusing exercise questions. I do not need code, just to know what he is referring to. [QUOTE]Write a template function count that returns the number of occurrences of value … | |
Hi everyone, I'm dealing with a linked list that is supposed to be sorted. It's consisted of a series of strings which each of these strings are associated with 4 more strings. So, I'm looking for a way to sort this linked list with optimum way possible. I have some … | |
Please help me undersatnd why this code does no work, even when it compiled without problems. After I have input the filename the application just hangs up and aborts thereafter. My input file contains the graph' adjacency matrix and the application is supposed to pull this data from the file … | |
Hi, i recieve and undefined refrence error when i try to link files, and i think it is due to the use of templates. I have a .h file which has 2 classes and there respective functions in them, however i want to place the functions into a .cpp file. … | |
Ok, I'm a bit confused on this whole thing, I guess I just need another brain on this. Each line in my CSV file reads something like this: LAV32,Aluminum RTV Silicone 30/bx,T614A,Lavanture,12 Now, LAV32 would be the id tag that would be read by a barcode scanner. What I need … | |
If I have a class in a namespace, like this: [code] #ifndef MyClass_h #define MyClass_h namespace NyNamespace { class MyClass { public: typedef double MyType; MyType Read(); }; } #endif [/code] And the implementation: [code] #include "MyClass.h" namespace MyNamespace { MyClass::MyType MyClass::Read() { MyClass::MyType A; return A; } } [/code] … | |
im facing the problem on how to use the ctime random,for loop and array in my assignment..can u help me??the following is the problem statement and the condition.. Problem Statement Simple Arithmetic Quiz Application! Write a program which has five selections as below: (1) To register number of participants and … | |
Hello Friends, I want to study about Patterns. Can you pls. refer me a simple beginner's guide for Patterns? If you have any online material/tutorial, pls. share it to me. Regards, Vivek | |
Hello, I'm learning C++, and recently i was searching for an implement of the [i]zlib[/i], that is a library to zip and unzip files, but i found a sample code in [url=http://idlebox.net/2007/0328-ZLibString.blog]this site[/url], but i want to know two things, first: How i can change this code to only compress … | |
[CODE]#include <iostream> using namespace std; int main() { int c_hrs1 , c_hrs2 , c_hrs3 , c_hrs4; float gpa_1 , gpa_2 , gpa_3 , gpa_4; int total_c_hrs= c_hrs1+c_hrs2+c_hrs3+c_hrs4; float cgpa= ((c_hrs1*gpa_1)+(c_hrs2*gpa_2)+(c_hrs3*gpa_3)+(c_hrs4*gpa_4))/total_c_hrs; cout<<"**********************************************************************"<<endl; cout<<"\t Welcome to GPA Calculator for Dummies"<<endl; cout<<"Please enter you GPA in course 1: "; cin>>gpa_1; cout<<"Please enter the … | |
hi, im facing problems with my codes. here is my bool RequestAnswer & main fcns (fyi, i already declared my class declaration before and it's fine). when i run it, it will give a question such as: 2/10 + 3/10 and it asks for the answer. if i enter correct … | |
Hi, I'm trying to fork out number from this expression. Obviously without any luck. I wonder if anyone could help and suggest good book about regex. [code=c++] boost::regex reg("[[:blank:]]*move[[:blank:]]*\\d{1,3}[[:blank:]]*, boost::regbase::icase); [/code] Thank you |
The End.