General C++ Programming - January 2013 (Page 14)

by yhu420
One letter of a string comparison
 
Hello everyone, I have a beginner question, im sure the answer will be a stupid simple thing... I just would like to turn this into cpp: string eg("azer...
[4 replies] Last: @ajh32 no it won't help because you just did his homework for him :) T... (by Zaita)
by ritka
getting started on big opensource projects
 
hi everybody, i have been coding for quite a long time just for my own fun and purpose and now thought about to get started on real projects. so i downloaded s...
[2 replies] Last: yes, you're right. it looks like this :) the link looks good. i didn't... (by ritka)
C++ Help Beginner
 
// == equals comparing != Equals (First Value != Second value(NOT equal to second value) // >= Greater than or equal too, <= Less than or equal too #inclu...
[1 reply] : Look through this code snip else(FirstValue!=SecondValue);{ cout <<... (by vlad from moscow)
Square Roots and Totals Table
 
Hey I am looking to create a table somthing like this output below but I am very new to this and my code is abit everywhere. x sqrt(x) x ^ 2 ...
[1 reply] : You can also use cout.fill('0') to make your output more uniform in it... (by Ogoyant)
by jaded7
templated methods within templated classes
 
supposed i have a templated class template<typename T> class myClass; Is it possible to a) have a templated method within the class, like below: template<...
[5 replies] Last: #include <iostream> template <typename T> struct A { template <type... (by vlad from moscow)
Difference between iterator and pointer
 
Hi, I just figured out that some std functions (for example: copy) need the resource and target objects have iterators to work. Otherwise, the compiler rejec...
[9 replies] Last: Thanks to you all for your explanations. It's all clear now! :-) (by dekeenfrance)
by arms4
if problem!
 
Hi i'm trying to write a program and i've encountered some problem with the if part... Can we use string in if statement? because no matter how i input a stri...
[19 replies] Last: @Peter87 But honestly, I do prefer strcmp because you don't have to... (by vlad from moscow)
by erdc
cannot pass objects of non-trivially-copyable type 'struct
 
This is the error I get: cannot pass objects of non-trivially-copyable type 'struct std::string' through '...' for the code below: #########################...
[2 replies] Last: Thanks Branflakes91093, that did the trick. (by erdc)
symbol table
 
please tell how to create a symbol table for an assembly language and high level language in c++?
[1 reply] : A symbol table is simply a collection of information about each of the... (by AbstractionAnon)
by CXO2
Overflow number
 
Hi all I am new in C++ and I just learning something I am stuck on some operation math, I just learning from local website that provide problems question to...
[2 replies] Last: Thanks a lot! I was using BigInt and It was working! for who need Imp... (by CXO2)
by nutz
Arrays and Functions
 
I need help with this question please! Please write me step by step instructions or how should I begin the problem. Thank you for your time ;) Write a funct...
[6 replies] Last: ok great ;) (by nutz)
Program questions.. for CONDITIONAL STATEMENTS
 
1. Make and run a program that will input 5 numbers and output the highest and lowest numbers 2. Make and run a program that will input 3 numbers and display t...
[1 reply] : Please, show what you have done at this point. We are willing to help ... (by MiiNiPaa)
Identify correct function pointer from Vtable
 
We know that function pointer for virtual function are stored in a vtable.When we have multiple function pointer entry in vtable and we call one of the virtual ...
[4 replies] Last: It's the work of the compiler. When it translates the code "derived->s... (by KRAkatau)
loop each queue (1,2)
 
I have n number of queues (depends on the no. of threads ) and what i need is that, i want loop each of queue starting from from the 2nd queue to the nth (end)...
[25 replies] Last: do i need to declare again std::size_t size = q.size(); inside the de... (by coder777)
Avi in CMFCRibbonStatusBar
 
Hello to Everyone. I have created MFC Ribbon Application in VS2010. I have attached avi with CMFCRibbonStatusBarPane with Autoplay mode. Whe...
[no replies]
How to get object of original class from function of other class where other class object is member of original class
 
hi every one The case is like class B{ public: somedata; somefunction(); } class A{ public: data; function(); } in somefunction i want a pointer t...
[2 replies] Last: Are you forced to use the classes as you have defined or can you have:... (by ajh32)
mathematical question
 
This is the formula for the equation.... Result = 1+ 2!/((x-2))-3!/((x-3))+4!/((x-4) )- … n!/((x-n)) can anyone tell me how to create this program....?...
[7 replies] Last: I guess, that will be your homework :) (by Santosh Reddy)
Same code, but twice slower
 
So, here is this code. I compiled it with both C(tcc) and C++(VS2012), and the result each program printed was quite weird. The average time of C++ was around 0...
[3 replies] Last: Execution time depends a little on compiler used and a lot on methods ... (by Smac89)
Doubt on virtual destructors
 
Hello All I have been reading Effective C++ by Scott Meyers. The book says that the destructor of a base class should be defined as virtual if and only if th...
[3 replies] Last: The reason why he says that is like cire already pointed out. If the d... (by IceThatJaw)
Making multiple endlines
 
Is there a way to make multiple endl instead of using the following: cout << endl << endl << endl
[3 replies] Last: The actual endl flushes the stream though. Using the '\n' character do... (by IceThatJaw)
January 2013 Pages: 1... 1213141516... 36
  Archived months: [dec2012] [feb2013]

This is an archived page. To post a new message, go to the current page.