General C++ Programming - February 2017 (Page 15)

Is there a way to see what's in the buffer?
 
Simple question. Is there any function available to allow a programmer to see what is in the buffer at any given time? Something like seebuffer(); something or ...
[4 replies] Last: Also of interest might be std::istream::peek and particulary its assoc... (by gunnerfunner)
In what case should I use gcc compiler instead of g++
 
My book tells me that g++ is part of gcc. What compiler is the best for C++ and Qt ??
[1 reply] : g++ and gcc are part of the GCC (GNU Compiler Collection). g++ and gcc... (by helios)
One string into multiple variables
 
I'm working with classes and i have this little problem the constructor is based on (string, int, enum, enum) this is main Pokemon timburr("Timburr,...
[1 reply] : The constructor for Pokemon takes four parameters. "Timburr, #532, Fi... (by helios)
Scientific notation still not being fixed
 
Alright. This one is better explained when seen. Code: ********************************************** void baseconversion(int charva...
[4 replies] Last: #include <iostream> int main() { for( double value : { 0.1, 123.... (by JLBorges)
can anyone ecplain the process behind this output
 
#include<iostream> int main() { int i; int arr ={4,6,10,12}; int*pointer=arr; for( i=1;i<=3;i++) { std::cout<<*pointer<<"#"; pointer++; } for(i...
[1 reply] : #include<iostream> int main() { int i; int arr = { 4, 6, 10... (by dhayden)
How do you separate a program from the compiler?
 
That title may be confusing. What I'm trying to figure out is how do I take a program that I've created in my compiler(Visual Studio), and separate it from the ...
[1 reply] : It looks like there's some fundamental confusion about what tools are ... (by mbozzi)
How to share info between two functions without using global
 
#include <iostream> using namespace std; void first(), second(), third(); int main() { first(int a); int d = 9; cout << d << endl; return 0; } void first(in...
[4 replies] Last: @AbstractionAnon. Thank you all for the help, and thank you for tel... (by BrewGoggles)
files struct array
 
i have an array and struct i read the first file fine the second file im having a problem with because all the id are not in order so how would i compare two s...
[9 replies] Last: @ghost1111 You had int num at the start of your source, so I just use... (by whitenite1)
Getting [Resource error] syntax error in empty space in_private.rc file
 
I am using Dev C++, and I am trying create a dialog box in a Win32 program. I have the resource file as well as the header file set up. When I try to compile ...
[2 replies] Last: Here is the file dialog.rc #include <windows.h> #include "resource.h"... (by rubixben)
filess
 
let say i have a file 0 sandy a 1 billy b 2 tom c 3 tiffany d 4 tommy e struct student for the example { string person int studnetId ...
[2 replies] Last: int tmp1//should they be int int tmp2 while(Infile >> tmp1 >>studen... (by ghost1111)
by gary24
corners of a triangle form degrees
 
the code looks like this const double PI = 3.1415926535897; struct mStruct { double A_towerx; double A_towery; double B_towerx; double B_towery; ...
[3 replies] Last: out put now with added std::cout.precision(4); cout <<"A corner x= ... (by gary24)
Speakers and raw audio
 
Hey, I'm playing around with raw audio right now, producing chirps and tones and that sort of thing, but I read that sending data that puts the speaker to full ...
[3 replies] Last: Yes, that's roughly what I said. Of course, I made some simplification... (by Chervil)
cuboid simulation box
 
I want to create a cuboid simulation box with lattice points at a regular lattice spacing and store the lattice point coordinates in an three dimensional array....
[3 replies] Last: Let me guess: VMD = http://www.ks.uiuc.edu/Research/vmd/ PDB = http://... (by keskiverto)
compile time selection of functions
 
I have following scenario: #include <type_traits> template<typename T> struct A { }; template<typename T> struct B { void x() { } }; struct C { ...
[7 replies] Last: Consider using boost TTI. Yes, I always do, but actually I failed to ... (by coder777)
Using heap based priority queue to implement knapsack
 
Any professional know ?
[1 reply] : Troll. (by TheIdeasMan)
I need help with pointers (& and *) and functions
 
I'm trying to return the pointer to the variable that has the bigger value using pointers & and *. Below is the source code for my main.cc, functions.cc, and fu...
[1 reply] : Hi, In your function a and b are already pointers, the return st... (by TheIdeasMan)
Delete a printed character from console
 
#include<stdio.h> int main () { char c; for (c = 'A' ; c <= 'Z' ; c++) putchar (c); return 0; } it will print characters from 'A' to 'Z' on console. n...
[2 replies] Last: Thanks SamuelAdams It worked with cout<<"\b \b"; (by Yousaf99)
File Input reads last line twice c++(urgent)
 
void CLAN::dispclan() // function 3 display function { clrscr(); ifstream fin("clan.dat",ios::binary); line(); cout<<"\n\t\t\tLIST OF CLANS...
[2 replies] Last: i got the sol. its in bold void CLAN::dispclan() // function 3 displ... (by STARK3212)
Parsing file by comma
 
I found this bit of code, on this forum, but there is not really an explanation of what it's doing. It's opening a file and reading it in, then it's supposed to...
[4 replies] Last: Thank you!! that fixed a major hang up with my program that I was figh... (by ff210327)
by LongDo
Help - Read data from a file to array
 
This is my code: #include <iostream> #include <fstream> #include <string> #include <iomanip> using namespace std; void load(string , string , double ,...
[2 replies] Last: Thank you so much sir. This really helps (by LongDo)
February 2017 Pages: 1... 13141516
  Archived months: [jan2017] [mar2017]

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