51,593 Topics

Member Avatar for
Member Avatar for pala2222

hi. How to save a bit on the physical disk in the C + +. ofstream write only file, and I would like to save the hard bits but I do not know how to do it

Member Avatar for pala2222
0
252
Member Avatar for dusktreader

I have a class hierarchy in which the base class is abstract. Each derived class has a set of private members which describe parameters that control how the class processes data. I want to enforce implementation of a setParams() function across all derived classes. However, because the parameters for each …

Member Avatar for dusktreader
0
271
Member Avatar for lashatt2

I have a question, for example I input something on edit and in that time when I'll click on search button it will show find message, but it shows mysql error :'( why? what I am doing wrong in this code? :( [CODE]HWND edit; char t[MAX_PATH]; char query[MAX_PATH]; GetWindowText(edit,t,MAX_PATH); mysql_query(conn, …

Member Avatar for mitrmkar
0
99
Member Avatar for atticusr5

Hey everyone, I have to take some code and make my a linked list using the accounts class. would i simply have to replace the list class with a struct???? here is my code.... [CODE]//Assignment #6 due 2-8-2010 #include <iostream> #include <iomanip> #include <fstream> using namespace std; //global declarations typedef …

Member Avatar for Ancient Dragon
0
77
Member Avatar for dpreznik

I have an MFC application. On the following line MonoBuff = new short[iSize]; an exception is thrown that is caught in CATCH_ALL(e) block in wincore.cpp, getting "Warning: Uncaught exception in WindowProc". It is said to be a CMemoryException. Surprisingly, when I tried to use try/catch block in my code, CMemoryException …

0
62
Member Avatar for i_luv_c++

hey everyone i need help help with sorting chars what im trying to do is show four words in order of increasing [CODE]sample run: 1) set 2) wall 3) table 4) answer[/CODE] CNT use No arrays, programmer defined functions or loops. however can use built-in swap() function,if and or switch …

Member Avatar for Fbody
0
78
Member Avatar for VilePlecenta

Example Image: [url]http://img710.imageshack.us/img710/4310/cropexample.png[/url] I need to make a cropping tool such as the on in Photoshop ( Fig.2 ) So is there a way to do selective area transparency( Fig .1 ) ( I have only done whole window transparency ) Because the only way I can think of doing …

Member Avatar for VilePlecenta
0
90
Member Avatar for nukes88

Hi, i have a problem, i am using a library given by my university to create a game, these are my classes and cpp files, and i am getting this error: error C2512: 'Board' : no appropriate default constructor available, pls help. [code] class Board { protected: GWindow &Gwin; int …

Member Avatar for jonsca
0
170
Member Avatar for ashokkumarrsp
Member Avatar for cassie_sanford

I am writing a program that computes the tax and tip on a restaurant bill for a patron with a $44.50 meal charge. The tax is 6.75 of the meal cost. The tip is 15 percent of the total after adding the tax. I have to dislay the meal cost, …

Member Avatar for Fbody
0
413
Member Avatar for pearle

Hi, all. I'm pretty new to C++, and I think I'm getting the hang of it, but there's a problem with a program I'm writing and I just can't seem to fix it. The program's supposed to print a pyramid like this: [ICODE] 1 1 2 1 1 2 4 …

Member Avatar for tetron
0
126
Member Avatar for Bench

The C++ [i]string[/i] type can be converted to a [b]const[/b] null-terminated string using [icode].c_str()[/icode] for interoperability with legacy C code. However, this poses a potential problem when mixing [i]std::string[/i] with functions designed to mutate a string in-place. a const_cast to get around this issue results in undefined behaviour, since the …

0
966
Member Avatar for bobsta

Hi, I am trying to render irregular polyhedra composed of multiple closed polygons: each polygon i comprises a plurality of points j having the same z-coordinate. The points are not sorted within the polygons. The polygons can be convex or concave and are sometimes split(by having multiple closed polygons for …

0
68
Member Avatar for blackmagic01021

hello Everyone, I have a problem with type casting. My code is [CODE] zcpr.next_in = FilePtr;[/CODE] next_in is a element of the zcpr structure where its type is and FilePtr is a void type pointer. zcpr is a z_stream type structure and next_in is a Bytef type pointer. This code …

Member Avatar for blackmagic01021
0
125
Member Avatar for suncica2222

I need simple timer that should not mess with the threads,and doesnt use Sleep(). I need something like this: [CODE]int main(){ function1 { whule(1) { // do stuff execute evry 30 min function2(); } } return 0; }[/CODE] So function1 and while(1) must not be slowed down and need to …

Member Avatar for suncica2222
0
149
Member Avatar for Behi Jon

Hi, When I want to run a simple project in NetBeans, I receive an error : [quote] ! was unexpected at this time. c:\MinGW\bin\make.exe: *** [.validate-impl] Error 255 BUILD FAILED (exit value 2, total time: 219ms) [/quote] My eclipse is working properly with this MinGW installed on my computer . …

Member Avatar for Behi Jon
0
361
Member Avatar for neethumol
Member Avatar for jonsca
-2
40
Member Avatar for bobsta

I am trying to render multiple scenes in different window. I am confident that the data is correctly read in from the .txt file and used to initialise the Beam and Segment objects (each Beam object comprises >=1 Segment) However when I attempt to render the scenes the program tries …

0
81
Member Avatar for chinnaedu

hi everyone...... am right now working on a project which needs to connect to vlc player from code....does libvlc support this or else if there is any other please let me know...... my another doubt is there any possibility(like any available APIs) that takes video file as an input and …

Member Avatar for chinnaedu
0
115
Member Avatar for fxpepper

Hello Can someone help me understand the difference? Human h = new Human(); or Man m = new Man(); vs. Human h2 = new Man(); recently I have seen an object instantiated like this - where it references this other object (after the "new" keyword ) I am trying to …

Member Avatar for kplcjl
1
558
Member Avatar for Specialafrican

I want my program to recognize tags, comments, and links in a html file. How would I get the program to read and count what I'm looking for? For example, if the html file has three links, how do I get my program to count it? Also, how would I …

Member Avatar for jonsca
0
95
Member Avatar for pinsickle

I have << overloaded to write to a file, however I get an error when I try to use it in main. I tried calling the actual write method. Is the SpareTable that operator that is failing. I already checked the .h and .cpp parameters and that all my #includes …

Member Avatar for jonsca
0
163
Member Avatar for moein_soltani

Hi guys.. In the huffman algorithm I have made an output file contain 0 and 1.. how can I say to compiler that these 1 and zero are bit no Byte. and how can i make the real Huffman output that its size is lesser than the initial file, What …

Member Avatar for moein_soltani
0
104
Member Avatar for AmigaCarolena

/*O.k. I am down to a few less errors. I do not understand how to correct them, I have placed the ";" everywhere and it does not make a difference, in fact I get more errors. Still confused! Thank you. Here it is again. This is a program that processes …

Member Avatar for EngSara
-2
141
Member Avatar for sleepybug

hey, i was writing this program for complex number calc and when i run it ,it never returns me the right values.. so can u plz make necessary changes where i m wrong.. YEAH AND ONE IMP THING TO TELL U I M BEGINNING WITH POINTERS AND I LITERALLY SUCK …

Member Avatar for jonsca
0
204
Member Avatar for mrnutty

We are all tired of from our daily lives. So I suggest to sit back and play this game. I present here a hangman game( text version ) for your enjoyment. There might be some bugs as I haven't throughly tested it, so sorry if you find it( I'm sure …

Member Avatar for mrnutty
1
290
Member Avatar for caribedude

I've been trying to make a synthesis game for my Organic Chemistry class, but when I try to draw some buttons on the screen I get a segmentation fault. I am using some functions for loading taken from Tim Jones's tutorial. I have built a Button class that has the …

Member Avatar for caribedude
0
247
Member Avatar for Geetha Choudary

explain what is the use of vector , lines.size and lines.push_back functions #include <iostream> #include <fstream> #include <string> #include <vector> using namespace std ; int main() { ifstream file( __FILE__ ) ; string line ; vector<string> lines ; while( getline( file, line ) ) lines.push_back( line ) ; cout << …

-4
44
Member Avatar for Hawkpath

Hey, my friend and I made this website: [url]http://www.letslearncpp.forumstech.com/[/url]. This website is complete with text and video tutorials made by my friend and I. Please visit this website and join it if you want to. Thank you.

Member Avatar for Hawkpath
0
197
Member Avatar for MrYrm

Hi, i have a program that runs a loop during that loop if the user types lets say "status" i want a status report if the user didn't give any input no status report should be displayed i played around with getline getchar etc but those wait for user input …

Member Avatar for MrYrm
0
173
Member Avatar for MrJNV

I'm having issues doing this assignment. I'm not really sure what's wrong, so hopefully someone can help HERE'S THE CODE[CODE] #include<iostream> using namespace std; class Vehicle { private: int Age; protected: float Price; public: Vehicle(); ~Vehicle(); void setAge(int i) { Age = i; }; void setPrice(float i) { Price = …

Member Avatar for dusktreader
0
108
Member Avatar for srinath3

hello c++ pros, iam a c++ beginner please help me with this code..iam unable to get the proper out put.In the above class i have tried to imitate String class and overloaded few operators. I got strucked up as show() method above was unable to print "t3" string properly.Please help …

Member Avatar for jonsca
0
119
Member Avatar for iammfa

:-/ Now, I'm trying practice on c++ basics, since few minutes I tried practice "for loop" especially, in console screen, I wrote this trivial program to calculate sin angles between angle (0 to 90) with for loop, but when i build it, it gave me one result like my attach …

Member Avatar for jonsca
0
120
Member Avatar for tikoti

Hi all, I have tried to make a little example of a random number generator for c++. However, as I am quite new in this language I do not know its peculiarities. Here is the code [CODE] //g++ -o ran ran.cpp #include <iostream> using namespace std; int main () { …

Member Avatar for jephthah
0
474
Member Avatar for Narue

Consider the following program and input file: [code] #include <algorithm> #include <cstdlib> #include <ctime> #include <functional> #include <fstream> #include <iostream> #include <iterator> #include <string> #include <vector> #include "natural_compare.h" struct natural_less: std::binary_function<std::string, std::string, bool> { bool operator()(const std::string& a, const std::string& b) { return natural_compare(a, b) < 0; } }; std::vector<std::string> …

Member Avatar for dusktreader
7
2K
Member Avatar for kekekerush

Hey all, I have to program a method that is called makelist, and I'm not sure how to program it. If I already have a list in my external file, how would I grab the list from there? I was thinking of infile.get(char) and keep going until it reaches the …

0
62
Member Avatar for gnarlyskim

trying to do input checking for an alpha character inputted where a numeric one is needed. I've implemented this function firstChoice() to allow a certain response is '2' or '3' was picked and then another certain response for anything other than '0 '1' '2' or '3'. I must add another …

Member Avatar for gnarlyskim
0
442
Member Avatar for taggz19

i don't know how to make 1.6666667 to 1.6 only.. . please someone help me. . please! please! please!

Member Avatar for peter_budo
0
403
Member Avatar for josh06

I am 12, mad about computers and skateboarding, im an emo, i know it doesnt sound right that i like programming. anyway, i have started learning c++, only just! I would like to know first of all if it is possible that you can build your own operating system with …

Member Avatar for josh06
0
118
Member Avatar for 28daniela28

Hi, I'm working on a C++ mini-project ( I'm having an unoriented graph for wich I have an admissible flow and I have to determine the minimal flow for it). Everithing works fine, it compiles and runs well (the code is below) but I'm using files to read input and …

Member Avatar for 28daniela28
0
191
Member Avatar for sahiti
Member Avatar for Dave Sinkula
-5
138
Member Avatar for mrinal.s2008

Hi, While writing program for making a member function of one class a friend of another, VC++ is shooting two errors. The entire code is split across five files, 2 headers for two classes, 2 .cpp for the class members' definitions and 1 containing main() function. The headers are as …

Member Avatar for Fbody
0
195
Member Avatar for arakawid2120
Member Avatar for riotburn

I am trying to automate my program for Simpsons rule. Finally got it running thx to here, so now I'm trying to have it ask the user for all the variables on run. Everything is good except for inputting the function to integrate itself. After entering the function i get …

Member Avatar for jonsca
0
1K
Member Avatar for team_ferrari22

Hi All, We want to create a c#/VC++ application by using which we should be able to create sql server database SNAPSHOTs in our own file format (in online manner). And later we should be able to get data from those snapshots files in offline manner using our application ( …

0
103
Member Avatar for team_ferrari22

Hi All, Is there any way to convert the Sql Server 'Snapshot' files (*.ss files) to some other format...like 'xml','xls' or 'txt'...etc. Thanks.

Member Avatar for kvprajapati
0
114
Member Avatar for c1979h

I need some guidance formulating a Do, For, While output using a Fibonacci sequence. After searching the foums I only saw posts that had just the sequence of numbers outputed like so: 01123453 after a set number was preset. I need the output to display like so: 0 +1 = …

Member Avatar for jonsca
0
125
Member Avatar for abarlowa

I need help with the errors in my code. Here is my pseudocode along with my program code following: [B][U]This is my pseudocode:[/U][/B] Start Declare Variable int length int width int area Print (“Enter length of room in ft.: “), Input length Print (“Enter width of room in ft.: ”), …

Member Avatar for abarlowa
0
1K
Member Avatar for higuain14

Hi I'm new to c++ programming. This is my first ever program, it calculates the average of numbers that the user input. The user can input up until 10 numbers. I get a segmentation fault for some reason. Any ideas? [CODE]#include<iostream> using namespace std; int main() { int numbers[10]; // …

Member Avatar for naresh.M
0
115
Member Avatar for casjackkwok2001

I'm working on my c++ assignment (bubble sort), but i 'm stuck on my code. Is there anybody know how to print out the array contents after [B][U]each pass [/U][/B]of the sort? Should I use a for loop or a function call to print out?? thanks int first_array[8] = {13, …

Member Avatar for vmanes
0
262

The End.