General C++ Programming - April 2014 (Page 28)

by chhe
2d vector adding columns
 
I have a basic question regarding 2d vectors. The following code makes a 2d vector and fills it with a matrix of integers. The vector tempVector3 gets added as ...
[5 replies] Last: Well you weren't specific how you wanted it. To do that you will have ... (by giblit)
by Subo93
2D array find max
 
//it outputs max is 0 ,can anyone show whats the error?thanks.. #include<iostream> using namespace std; int main() { int mid ; int data ={{3,6,7,7},{7,5,4,4}...
[2 replies] Last: Thanks.. (by Subo93)
Methods arguments alteration rules in Java and C/C++
 
Hello and thank you for reading my post. First of all, I am more a Java programmer in my programming practice... I realized recently (to my very great asto...
[1 reply] : Where to start with this? So many problems. point.cpp line 5: ct... (by AbstractionAnon)
Vector of pointers: Push back objects/const parameters
 
I have a class called Question: #include <string> #include <vector> using namespace std; class Question { string title; vector<Thing*> posA...
[2 replies] Last: I'm making a 20 question style game. The pointers are for AI purpose. ... (by dleanjeanz)
by younes
Compile a method separaltely
 
Hi, There is any method to compile a method of a class separately from the other methods and the main. Thanks Younes
[1 reply] : Put it in a separate .cpp file. (by AbstractionAnon)
by younes
using c++11 in Mac operating system
 
Hello, I would like to use c++11 in my Mac system. Could someone show me how to install the compiler of c++11 to use g++ with the option -std=gnu++11 or g++ ...
[6 replies] Last: http://clang.llvm.org/get_started.html edit: coliru.stacked-crooked p... (by Little Bobby Tables)
Modifying a program for adjacent triplets in C
 
I have this program that calculates adjacent pairs. My question is how can I modify it to calculate adjacent triplets? //Include statements. #include <cst...
[11 replies] Last: Okay thanks for the help I figured it out. (by ragekage)
zip to city
 
Would this program be good and complete? #include <iostream> #include <fstream> #include <string> using namespace std; int displayMenu (); void a...
[11 replies] Last: That is much better, I can read your code now. So what is the question... (by SamuelAdams)
c++ windows application form
 
I'm a begginer in C++ and I downloaded the Visual studio 2010 express to design a Windows application form. I'm trying to display in a XY-chart the X and Y coor...
[no replies]
Base class member
 
I have encountered following lines in base class and I do not comprehend its meaning of "= 0" at the end of the member functions; distance_list intersect(ra...
[3 replies] Last: Thank you for your answer. I am wiser now. (by sjon9742)
Programs like PAINT
 
How Can I create programs like Paint ? I know all the basics features of C++ like : -Object-Oriented programming -Classes and objects -Recursivity -Co...
[1 reply] : You need to learn some GUI library/toolkit that lets you create Graphi... (by Stormboy)
by rubito
Help timing a sorting function
 
Can someone help or point me in the right direction? I'm writing a program that will implement BubbleSort and MergeSort and time them as they sort a dynamic arr...
[3 replies] Last: You're not allowed to use the standard C++ stuff? std::cout << "Sort... (by Duthomhas)
by Kauto
Initializing const data member
 
Here's a part of my program. What I need to know is how I can pass an argument to the Book constructor so I can change the const data member Category (with casc...
[2 replies] Last: What I need to know is how I can pass an argument to the Book constru... (by coder777)
exception proof assignment operator
 
guys, below is exception proof approach of assignment operator shared by scott meyer. Can anybody let me know is it safe to delete the raw pointer. ...
[1 reply] : whether this is safe to delete orig depends on whether it points to an... (by coder777)
User defined function issue - different answers
 
I have written a code which uses a number of functions but something bizarre happens for one of these functions. it has two double parameters a and b. c...
[7 replies] Last: Just for your own sanity, I'd modify your code to print out the values... (by MikeyBoy)
by Zaaku
Problem with 'Sint16 {aka short int}'?
 
Hello, I have downloaded from the internet, source alternative tibia client and I have many problem. I am a novice programmer in C++, help me if you can, This ...
[4 replies] Last: warning: no return statement in function returning non-void [-Wreturn... (by Peter87)
Arrays in C++
 
Hi everyone, I am trying to write a program that inputs 7 scores into an array and then drops the lowest score and averages the remaining scores. However, I ...
[5 replies] Last: Also, the function "GetLowest" is wrong. it doesn't find the lowest,bu... (by bufige)
by Johnyd
c+arduino
 
expected initializer at end of input,,What this mean ? void setup() //Standard PWM DC control int E1 = 5; //M1 Speed Control int E2 = 6; //M2 Sp...
[1 reply] : Please post snip of the code that causes this error. (by kannanmj)
What does the STS in this code mean?
 
So im trying to learn c++, and this book gives me a conversion code. What does sts mean in the bottom of the code? // // main.cpp // CODE // // Creat...
[1 reply] : sts is function parameter (formal parameter). It receives the external... (by kannanmj)
Weird "is ambiguous" errors
 
I keep getting weird "is ambiguous" errors in Visual Studio 2012. They don't seem to be caused by any of the normal reasons, and have completely random fixes o...
[1 reply] : If you remove using namespace std; I think it will result in the int... (by LB)
April 2014 Pages: 1... 2627282930... 41
  Archived months: [mar2014] [may2014]

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