473,544 Members | 1,870 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C / C++ Forum

C / C++ programming language - Get answers to questions about compilers, visual C++, templates, namespaces, classes, data structures, OOP (object-oriented programming), inheritance, data types, exceptions, Standard Template Library (STL) and the C Standard Library.
1
2,446
thread by: HectorBerlioz | last post Oct 31 '06 by: manontheedge
I'm new to c++, so bear with me... Whenever I execute the code below, I am able to enter my name, but then the program skips the "getline" for the movie title and goes straight to the final cout statement. What am I doing wrong? Thanks, Terence
5
2,446
thread by: ChuckB | last post Nov 8 '06 by: Daniel T.
Ok, heres the code i've come up with #include <iostream> using namespace std; bool bear (int); void main( ) { bear(250); // is true bear(42); // is true
4
2,446
thread by: Abdul Samad | last post Apr 5 '07 by: Banfa
banfa just said that it is because so the compiler may not assign the same memory to two variables but my question is WHY DOES COPILER ASSIGNMS MEMORY WHEN THERE IS NO NEED OF IT? as the structure has no data types or member functions so why the memory needed to be assignem to structured variable with no data types? for what purpose? ...
1
2,446
thread by: Oskar Bennet | last post May 1 '07 by: =?iso-8859-1?q?Kirit_S=E6lensminde?=
Hi everybody, I am supposed to draw a simple UML diagram for a very small project that consists of less than a dozen classes. I have never been working with UML before, I have read some tutorials but I cannot find the connection between UML and my C++ code. What I have found out so far is that inheritance is indicated by an arrow like this...
4
2,446
thread by: suryamargha19 | last post Jul 19 '07 by: sicarie
Hi, Give me a complete quine in c++... SURYA
1
2,446
thread by: gnptf | last post Sep 21 '07 by: weaknessforcats
Dear all, I encountered with this issue when I use eclipse ide to check a small 'C' code I entered this tiny program. #include<stdio.h> int main()
1
2,446
thread by: cnixuser | last post Oct 20 '07 by: Banfa
I am posting this on behalf of a friend of mine who is trying to write a simple program that calcuates pi. He is trying to get as many decimal points as possible down in the calculation ;however, no matter what data type he seems to try, the greatest level of precision he can get is 6 decimal places. Below is a copy of his source code, can someone...
1
2,446
thread by: aviraldg | last post Dec 1 '07 by: weaknessforcats
Some other programs like QBasic can use colors in their text.. so can c++? basically my question is that can we cout in colors?how?
1
2,446
thread by: Ramon F Herrera | last post Mar 6 '08 by: Christopher
I am an experienced C developer, but also a newbie in C++. I am trying to compile and run the following code snippet on Linux: FieldIterator itr = doc.GetFieldIterator(); while (itr.HasNext()) { Field field = itr.Current(); Console.WriteLine("Field name: {0}", field.GetName()); itr.Next();
4
2,446
thread by: KrisKris | last post Oct 9 '11 by: donbock
Hi there, I have to write simple programm and test what heppens when I incorrectly identify types for output. for example: main(){ int a=5; printf("value is %f",a); } outcome of the print statement is 0.000000 instead of 5. why?
1
2,446
thread by: 1234abc | last post Nov 2 '20 by: Banfa
#include <iostream> #include <iomanip> using namespace std; const float STATE_TAX_RATE = .07; const float FEDERAL_TAX_RATE = .15; const float SOCIAL_SECURITY = .17; const float MEDICAL = .03;
7
2,447
thread by: cylin | last post Jul 19 '05 by: John Harrison
Dear all, We know that a vector can increase its capacity. Does it mean that system will allocate more memory to fit the value of capacity? If yes, then we maybe cost memory if capacity is greater than its size. To use resize() function, it can't reduce capacity. How to reduce capacity to zero or delete a vector type variable completely?...
3
2,447
thread by: Shardul Kulkarni | last post Jul 19 '05 by: Jim
Hello everyone, I am Shardul Kulkarni,and I am doing M.Sc.(Computer Science) from PUNE University (INDIA). I have one subject : Windows Programing using VC++(SDK). So, can anyone refer me some good links,books or online tutorials for the same. I will be very thankfull to the person.
28
2,447
thread by: Jed | last post Oct 16 '05 by: Michael O'Keeffe
Hello to all! I have a couple of projects I intend starting on, and was wondering if someone here could make a suggestion for a good compiler and development environment. My goals are as follows: 1. Develop the project code on XP.
1
2,447
thread by: geek589 | last post Nov 13 '05 by: Artie Gold
i am writing an os with it's own file system, and i need some way to format my disks from windows. for this i need to write directly to the disk. i have tried may methods, but failed. please help!!
1
2,447
thread by: Randy | last post Jan 7 '06 by: David Harmon
Hi, I downloaded and tried the ENUM++ code from CUJ http://www.cuj.com/documents/s=8470/cujboost0306besser/ but can't even get it to compile (see following). I have also downloaded and installed the boost library. This is using gcc under FC3.
10
2,447
thread by: Jim Langston | last post May 15 '06 by: Richard Herring
Expected output of program: Key is: 0 String is: Hello Key is: 1 String is: Goodbye Key is: 2 String is: The end Actual output: Key is: 0 String is: The End Key is: 1 String is: Key is: 2 String is:
5
2,447
thread by: Leslaw Bieniasz | last post Jun 7 '06 by: Noah Roberts
Hello, I have the following OOP design problem. I have a base class designed as an element of a list, let's say: class A { public: // some stuff
7
2,447
thread by: pkirk25 | last post Oct 1 '06 by: Mabden
My data is in a big file that I have no control over. Sometimes its over 30 MB and often there are several of them. It is machine generated and is nicely formatted. Example text follows: AuctioneerSnapshotDB = { = { = 20, = 1, = {
2
2,447
thread by: angelcd | last post Dec 27 '06 by: angelcd
hi guys, i have here my sample program, actually it compiles and run but some of the output does'nt come out on the screen.. can someone help me what's wrong with this... here's my code: #include <iostream> #include <string> using std::cin; using std::cout;
5
2,447
thread by: raan | last post Apr 2 '07 by: Victor Bazarov
What I am trying to achieve here is depicted in the small program below. // Wrapit.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <map> #include <list>
2
2,447
thread by: Sniper471 | last post May 21 '07 by: Sniper471
Hey, I'm currently using Microsoft Visual Studio 2005 and Visual C++ within it. I need to remove the stack limit (if possible) or at least increase it. How would I go about doing this? Thanks in advance. P.S. It is not possible to change my code to fix the problem due to the nature of the program.
1
2,447
thread by: archanadeshmukh | last post Jul 7 '07 by: weaknessforcats
Please tell me how can i enter data in row column format in c++ files. when i enter data it gets stored as if a same line text i want to search for perticular name from file
3
2,447
thread by: bob | last post Oct 4 '07 by: Victor Bazarov
hi, I have been tasked with transferring a rather complex, deeply nested structure across dll's / memory spaces and effectively I need to deep copy the structure in question. Its a C struct and it contains pointers. I would have liked to think I could copy construct it, but I can't. I need to follow the pointers. Does anybody know if...
4
2,447
thread by: pandaemonium | last post Jun 6 '08 by: Laharl
I have two quick problems with the code I am writing: First, I define a struct of char arrays (strings) and then try accessing the same. I get an "incompatible types in assignment" error: struct { char name; char value; } varlist; int main(int argc, char *argv) { varlist.name = "foo";

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.