General C++ Programming - August 2015 (Page 10)

Printig data for a perticular decimal range
 
How can i print a double or float data type for particular decimal points(like 3 decimal point is .333 .122 etc) using cout?Can anyone help please?
[2 replies] Last: Thank you.It works. (by Alpha001)
by leourb
Nested While Loops with Pointers
 
If I have two while loops nested, the inner one should have the precedence compared to the outer one, is that correct? Because when I am trying to run this...
[6 replies] Last: You don't actually need the break because return ends the function. (by shadowmouse)
Pointer problem in c++
 
Hey guys i made a programe using pointer.At first it worked well but the problem is when i made a copy of it,the copied problem doesn't work.Can anybody help me...
[2 replies] Last: #include<bits/stdc++.h> using namespace std; struct data{ int *p; ... (by Alpha001)
execute action once when the criteria is met
 
So yes, hello everyone. I have stumpled upon a wall. I'm making a small project using rasperry pi 2. I'm trying it to send an SMS when relay have worked. With ...
[4 replies] Last: Solved. Used it like void loop() { //Read push on button A; A_is =... (by DarkChemical)
Why doesn't string work in switch?
 
Hi. I found something weird and I believe you're here to explain it to me. #include <iostream> using namespace std; int a; cin >> a; switch (a) { case 1: stri...
[2 replies] Last: Thank you very much. I think I quite uderstand what you wanted to tell... (by Maurycy5)
Macro that compares variables
 
Hi, guys, I'm trying to build a macro that will compare a user specified amount of variables, like so: #include <iostream> //compares x to only a and b #def...
[4 replies] Last: [quote=sasauke]I had an "if" statement that compared a variable to 13 ... (by LB)
c++ encryption project
 
Hello, I am quite "new" in the world of c++. I would like to request some help in writing a program in c++ that does the following job: 1. encrypts a group of ...
[1 reply] : encrypts a group of predetermined folders on a computer(with a predet... (by MiiNiPaa)
SDL_Image
 
I'm fairly certain I've included all the right headers correctly and the such, I have these: #include <SDL2/SDL.h> #include <SDL_image.h> However, SDL_imag...
[4 replies] Last: What do your project settings and folder layout look like? (by Avilius)
int to character array
 
How do I copy an integer into a character array in C/C++?
[4 replies] Last: The standard way to convert int to string in C is with sprintf int i... (by andywestken)
MERGE ARRAYS
 
I have a working merge sort but I would like the final output to merge both W & H arrays in the code below. Please anyone with help. thanks. // MERGE SORT ...
[4 replies] Last: You were asked in your previous thread to use code tags when posting c... (by MikeyBoy)
by sr123
creating your own linked list, how????
 
Design your own linked list class to hold a series of integers. The class should have member functions for appending, inserting, and deleting nodes. Don’t for...
[1 reply] : So what is your question? What have you done to solve the problem, and... (by MatthewRock)
Only one button works in delicious car game
 
In my simple car game I am making with windows.h I can only use one button not the other, how do I fix? case WM_KEYDOWN: switch (wParam) { ...
[2 replies] Last: You have your braces wrong. All the cases should be enclosed in a sin... (by MikeyBoy)
Assigning return value of a function to reference variable
 
Reference variables cannot be initialized to null, but what if I assign return value of a function to a reference and the return value is null? How would comp...
[4 replies] Last: > if the function returns null? What does 'null' mean in this context... (by JLBorges)
by kekie
Map to user-defined class
 
I have created a map between std::strings and a class I wrote called 'Room'. Right now room doesn't do anything, but the constructor takes four strings. When I...
[5 replies] Last: > actually correct way is to do that: > rooms.emplace(std::piecewise_c... (by JLBorges)
by mave
Is "Virus -Malware" a user space program or a Kernel Space Program ?
 
Hello, "Is virus (written in C/C++) a user space program (or kernel space)? especially spywares and the ones that steal information. I have tried to seek ...
[1 reply] : Please, do not double post. It clutters forums and spreads attempts to... (by MiiNiPaa)
by Radar
Unknown error with my code
 
#include <iostream> #include <ctime> #include <cstdlib> using std::cout; using std::cin; using std::endl; void sort(int unsortedArray , int arraySi...
[4 replies] Last: Your loop on lines 17-24 checks whether the unsortedArray contains an ... (by keskiverto)
by skt333
When reading from text file, How to read from the second line instead of the first line?
 
--------------- ENGLISH CHINESE HISTORY SCIENCE TEE KEE SONG 99 56 22 79 JOHN STONE 88 22 99...
[4 replies] Last: You already have it... #include <iostream> #include <fstream> usi... (by SamuelAdams)
class program for grades need help please
 
1. Write a grading program for a class with the following grading policies: a. There are two quizzes, each graded on the basis of 10 points. b. Ther...
[1 reply] : cin >> moreGradesToCalculate; //... cin.getline(response,256); http:/... (by MiiNiPaa)
by pfjf2
lists and dynamic variables
 
Hello again. I am still learning some basic C++. I am trying to write a short algorithm that creates a set of integers at run time and inputs them into a list. ...
[10 replies] Last: but they are created on the stack. Technically vector stores data in... (by MiiNiPaa)
by leourb
delete[] - Pointers
 
I have a question. I have written a little program that uses pointers and does simple things with those. I have only a question about delete function. If ...
[4 replies] Last: Thanks.. All clear now! :D (by leourb)
August 2015 Pages: 1... 89101112... 17
  Archived months: [jul2015] [sep2015]

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