Beginners - February 2017 (Page 14)

SDL question
 
Hello all. (solved myself in the end :) ) I have some basic program that should first display an image until a user clicks (drawWindowLoad) then it should loa...
[no replies]
Universal Character Names & cout function...
 
Following an example in the C++ Primer Plus 6th Edition by Stephen Prata, page 87 - here is the code I have: #include <iostream> int main() { using names...
[1 reply] : Solved somewhat. Used 'wcout', that works. Would like a better underst... (by mocitymm)
very simple array and pointer
 
Write a function find_min that takes a double pointer indicating the start of an array, and an int indicating the length of the array. It should return a pointe...
[4 replies] Last: double* find_min(double* a, int n) { double *p_min = a; for(... (by Mantorr22)
by mounir
compiling problem
 
i compile a glfw3 and glew2 program with g++ i done the linking correctly this is the command line: C:\Users\nidal\Desktop\united revolution>g++ main.cpp -L"li...
[8 replies] Last: Thanks for your effort,but under windows the library is named opengl32... (by mounir)
help again please
 
Idk how to post code like other people are doing. Sry if that is making this difficult. But I had to write a program that you are prompted to pick a starting nu...
[5 replies] Last: [quote=Spacemanspalds]Idk how to post code like other people are doing... (by Peter87)
Using a string in a calculation with arrays
 
Hi My task is to accept user input for a date in the format "dd mm" and then use the day and month to do calculation with array. The julian format should ...
[4 replies] Last: dayDateString1 = date1.substr(0, 2); monthDateString1 = date1.substr(... (by Peter87)
Circle Class inline doesn't count right
 
Hi! I have an assignment about classes and when I compile file I got the wrong answer. Can't find where mistake is but feel like it is in the header part. When ...
[1 reply] : Line 50 : Circle::setRadius does not update the new circle radius. v... (by Mantorr22)
Very simple code
 
Write a function suffix that takes a char* representing a null-terminated character array (a C string), and returns the string obtained by starting at the secon...
[1 reply] : char* suffix(char* text) { return &text ; } (by Mantorr22)
Help please
 
I have to write a basic program that counts down in increments of 10 from 100 to 0. we are supposed to use for, if, else, and, or while loops. it will print off...
[2 replies] Last: thanks the format confused me where you restated int x= 100 I wasn't u... (by Spacemanspalds)
Stroustrup's Superellipse
 
HI, I'm working through Stroustrup's PPP, on the graphics chapter 12, exercise 12 I need to draw a superellipse. Using, the maths function from Wikipedia I c...
[2 replies] Last: Marvelous! Thank you so much. (by Phoenixeyes)
Merging two arrays?
 
I would like to write a code that merges two string arrays and the below is what i have done so far.. and it's not allowed to run when adding arr1 and arr2 , ...
[2 replies] Last: The second for loop starts reading the array from i = n1 instead of i ... (by Hengry)
bool for no duplicates
 
I'm trying to make a simple bool function that can check if there are any duplicates in a string array. below is what i wrote but shows abort()has been called e...
[1 reply] : what would be the reason? At a guess, n is exceeds the capacity of... (by cire)
Question how to have invalid slot be staying just in one spot.
 
For my lab I am trying to have my SINGLE_CHIP, MULTIPLE_CHIPS, and MULTIPLE_CHIPS_ALL just do the string "INVALID SLOT, please try again". However when I run th...
[2 replies] Last: Thank you for your help! It really helped. (by jollyholly11)
Calling a function hw help.
 
Hey guys I'm attempting to call a function to calculate Feet per Second and Meters per second. Here is the question: Four track stars entered the mile race at...
[10 replies] Last: #include <iostream> #include <iomanip> #include <cmath> #include <s... (by Psycosiis)
help with pointers?
 
hello, I have a gameBalls class and a gameWindow class. so in gameWindow.h I have : gameBalls* balls; in gameWindow.cpp I have to include a gameBalls...
[9 replies] Last: [quote=oOoOo]in order to add the gameBalls object to gameWindow it nee... (by Peter87)
Trouble using getline and using ostream& operator<<
 
I am currently having a little problem. I have all my code currently working except for when I go to output. I am using getline currently to have the user input...
[4 replies] Last: Thank you so much! (by joe864864)
by Sentoo
C++ homework help
 
Hi guys, I am having trouble with this assignment of mine: Write a complete C++ program that asks the user to enter their complete name and a distance measu...
[4 replies] Last: @smartypantzss It worked correctly. The integer one was the right one.... (by Sentoo)
by tr0ne
Sum of each digit
 
Hello
[10 replies] Last: Always avoid global variables unless absolutely necessary. I'm not eve... (by integralfx)
vector insert function
 
i have a question regarding vector about having multiple info. for example if i have a file that contained firstName lastName and numbers if i do i: V.in...
[3 replies] Last: Then use 3 vectors. vector<string> firstname; vector<string> l... (by AbstractionAnon)
prime numbers
 
how I can write program print all prime numbers using by recusion function? #include<iostream> using namespace std; void prime(int x, int y){ for(int ...
[2 replies] Last: I need to edit code abov (by mohabd73)
February 2017 Pages: 1... 1213141516... 37
  Archived months: [jan2017] [mar2017]

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