Beginners - February 2018 (Page 11)

by isan
client connect continuously
 
I want to connect continuously with the client to establish a connection to the server, and if the server is disconnected, the client re-connects to the server,...
[4 replies] Last: I do this and it work ,thank you while (true) { fflush(stdout); ... (by isan)
How to return the pointer?(problem with pointer)
 
i cannot return the pointer. #include<stdio.h> char *str_chr(const char *str,int c){ while(*str++){ if(*str++==c){ return str; } } return...
[1 reply] : Since the type of str is const char * you cannot return it as ch... (by coder777)
by mt280
Errors in int main
 
My code seems to be working, I know that the user input is correctly adding to the arrays, but when I compile i'm getting errors in main, "expected primary expr...
[2 replies] Last: That is the missing piece that I have been struggling with. Thank you,... (by mt280)
Issues Combining/Reading Arrays
 
Hello, I'm trying to create a program that reads 2 input files, assigns the two input files to two arrays, then combines them into sequential order, and outputt...
[no replies]
Getting an error with array length
 
Not sure why I'm getting an error char sep = { ' ', ',', '.', ':', '\t' }; string words ; words = value.find(sep); string someWords = new string(5)...
[no replies]
Line breaks in code, print as one sentence. ???
 
Hey all! I'm new to all this and having trouble with breaking a line apart in the code (my prof won't let the code go past 85 columns), but I need it to print a...
[3 replies] Last: Yes. Simply remove the remove the line breakers, which are "\n" and ... (by fiji885)
I'm lost on this one..Any ideas?
 
Suppose that the input is 100 20 –8 50 20. What is the output of the following C++ code? int sum = 0; int num; int j; for (j = 1; j <= 4; j++) { ...
[1 reply] : #include <iostream> using namespace std; int sum = 0; int num; int... (by fiji885)
Program crashed at the start of third loop.
 
Hello every one, I am newbie in C++ Programming, my program always crash at the start of the third loop. Hope every one can help me fix it, here is my code: ...
[2 replies] Last: the mahoa() function in main() always crash at third loop (by bdtilove)
by Daim
need hwlp with loop and class
 
l am trying to enter name by user choice and trying to display that but l'm making a mistake, can anyone help me out please. #include<iostream> using n...
[4 replies] Last: like we run array elements using loops lm implementing that idea here,... (by Daim)
by Vinz24
non-repeating numbers in generating numbers
 
The codes do at it is(generating numbers) but when it generates, the number is repeating. How to solve it? #include<iostream> #include<cstdlib> ...
[1 reply] : #include <iostream> #include <random> #include <vector> #include <alg... (by JLBorges)
problem with pointer
 
how to figure out this problem with array
[1 reply] : Would it be possible to be more specific about the problem? (by chicofeo)
syntax of a function 'return'
 
Is there somewhere a syntax tutorial for: return . This function works well, but I can't find why the 'return' has 2 elements: - (unsigned int) , and - a c...
[1 reply] : The syntax is (roughly) return <expression>; . In the above, (unsig... (by mbozzi)
Help with the for Loop
 
I have a problem somewhere with my code, it works and I get it to the point where my output can have multiple transactions until you enter -99 0, but when you a...
[8 replies] Last: Thanks for your guidance, I figured it out with your help, thanks agai... (by Domanto)
Argument and pointer error
 
I have a class: //Button.hpp class Button : public sf::Drawable { public: sf::Text OptionalText; sf::Vector2f ButtonPos; //sf::Vector2f contains a c...
[7 replies] Last: Aha! Good idea! Yes, in reality the button class looks like [link=http... (by Optimistic Peach)
Create an array class
 
The requirement is to write an array class, include square bracket getter and setter, a getter to return data structure's capacity... And then we need to use...
[no replies]
linear function and quadratic function
 
Please help me to solve problem: I need to create an abstract class of Functions that contains abstract methods value() and zero function(). Derived class linea...
[2 replies] Last: ok, thank you (by carter40)
by JayGln
do-while loop with if trouble
 
I got stuck with something I know is staring me right in the face. The rest of the code works the way I want it to, but if have suggestion to make my code loo ...
[4 replies] Last: Your if() statement is really not necessary since you have the same co... (by jlb)
File reading and position question
 
Find the output of the following C++ code considering that the binary file CLIENTS.DAT exists on the hard disk with records of 100 members. class CLIE...
[1 reply] : CF.tellg() tells you the current position in bytes. Dividing by the si... (by Peter87)
c++ pico and online shell
 
I used a c++ online shell to do my coding and my class professor wants us to use pico to the programming. when I transferred my codes to pico, the code wouldn't...
[13 replies] Last: thank you i really appreaciate the help! (by poohbear)
How to fix thread joining issue
 
My code hangs up when trying to join the second thread. I looked online, but it seems it is similar to https://stackoverflow.com/questions/33431445/how-do-i-use...
[1 reply] : join() waits until the thread has finished. If the thread runs an infi... (by Peter87)
February 2018 Pages: 1... 910111213... 28
  Archived months: [jan2018] [mar2018]

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