49,761 Topics

Member Avatar for
Member Avatar for goody11

Hey, I was wondering how (if it's even possible) to create my own compiler directives. Any help?

Member Avatar for Salem
0
138
Member Avatar for Nathan Campos

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 = …

Member Avatar for Nathan Campos
0
476
Member Avatar for PopeJareth

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 …

Member Avatar for William Hemsworth
0
200
Member Avatar for lancevo3

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 …

Member Avatar for Lerner
0
85
Member Avatar for odwa
Member Avatar for mrnutty
0
107
Member Avatar for Jennifer84

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 …

Member Avatar for Dave Sinkula
0
3K
Member Avatar for power_computer

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 …

Member Avatar for VernonDozier
0
111
Member Avatar for jorge12745

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 …

Member Avatar for jorge12745
0
61
Member Avatar for southernd0529

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> …

Member Avatar for Nathan Campos
-2
120
Member Avatar for usagi713

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; …

Member Avatar for dgr231
0
248
Member Avatar for anil_t_n

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 …

Member Avatar for anil_t_n
0
640
Member Avatar for kamos.jura

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 …

Member Avatar for kamos.jura
0
1K
Member Avatar for yon kon

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) …

Member Avatar for kvprajapati
0
294
Member Avatar for redserpent7

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 …

0
78
Member Avatar for himgar

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.

Member Avatar for Acute
0
2K
Member Avatar for pyro_junky

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.

Member Avatar for Nick Evan
0
91
Member Avatar for pinsickle

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 …

Member Avatar for pinsickle
0
110
Member Avatar for winbatch

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 …

Member Avatar for winbatch
0
176
Member Avatar for Jacobxx

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 …

Member Avatar for Topi Ojala
0
78
Member Avatar for group256

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 …

Member Avatar for GDICommander
0
231
Member Avatar for Aprentchacker

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 …

Member Avatar for Aprentchacker
0
168
Member Avatar for Cosa

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. …

Member Avatar for Dave Sinkula
0
116
Member Avatar for bynaridoom

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 …

Member Avatar for bynaridoom
0
99
Member Avatar for daviddoria

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] …

Member Avatar for daviddoria
0
230
Member Avatar for chelseagoo

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 …

Member Avatar for mrnutty
0
245
Member Avatar for vivekarora

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

Member Avatar for mrnutty
0
119
Member Avatar for Nathan Campos

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 …

0
69
Member Avatar for Der_sed

[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 …

Member Avatar for mrnutty
0
153
Member Avatar for methmignonne

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 …

Member Avatar for methmignonne
0
282
Member Avatar for atch

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

Member Avatar for atch
0
101

The End.