Beginners - May 2019 (Page 5)

by SO AP
Drawing Cards from a deck keep drawing same card
 
c2 and c3 are the same number but i want them to be different numbers. the reasons its the same random is because i want to keep track of whats being "drawn" an...
[5 replies] Last: To finish keskiverto's point: To randomly choose things without repea... (by Duthomhas)
by sturk
C++ issue with + operator
 
My overload+ operator is not working properly. I am getting (0,0) for my output when it should have values instead. Would appreciate if anyone could help. Corr...
[1 reply] : fvector2D::fvector2D(std::complex<float>) doesn't do anything with its... (by helios)
by Sholi
Extra output while reading file
 
I wrote a program to read real numbers from a file, program is supposed to give 5 output ,as there are 5 list of numbers but I'm getting last numbers list repe...
[5 replies] Last: [quote=Sholi] EOF is true : so while should stop, & even if while doe... (by lastchance)
Segment fault! Need help
 
I receive the Segment fault (core dumped) error when I build the small queue by using pointer below. #include <stdio.h> #include <stdlib.h> struct data ...
[4 replies] Last: You're welcome! Although my advice still stands: learn to use your ... (by MikeyBoy)
my switch statement isn't working
 
I'm doing a project to find cost of car air conditioner service for different car type and model. it's stuck at switch 1 and ended afterward. any comment and he...
[3 replies] Last: I see. I will try do what you told me. thank for your advice! (by aliff heyqal)
FFTW Cycle Phase
 
I am using FFTW to get the frequency and amplitude from an array of double values. IS it possible to use FFTW to also get the phase. If it is then could someo...
[2 replies] Last: Phase is just arctan(imaginary/real), right? Each complex sinusoid of ... (by Ganado)
childwc.lpfnWndProc in Eclipse
 
Below the code to create a child window, but how to really call ChildWndProc to make a child window? Now it is creating a child window using WndProc. Thanks in ...
[6 replies] Last: I solved it now. const char g_szClassName = "myWindowClass"; const c... (by bchinfosieeuw)
A fstream MODE FLAG USE to delete
 
Does anyone know what mode do i use if i want to delete a specific data in a txtfile in the fstream
[4 replies] Last: Give a specific example. What exactly is the structure of your file? W... (by dutch)
C++ Help
 
Line 19: number_string[0-2] are chars, not integers. You're adding the ASCII values of the chars together.
[2 replies] Last: consider you number_string is '1' after input. '1' has ascii value 49... (by a00)
by Codman
Finding integer sub array into full array please help
 
void findsubstring(int arr ,int substring ,int arrlength,int substringlength) { int i,j; for(i=0;i<arrlength-substringlength+1;i++) { for(j=0;j<arrlen...
[1 reply] : @Codman, please put your code in code tags so that we can see what it ... (by lastchance)
Banking question
 
So I am trying to make a banking system that gives you choices on what you want. The problem is I want to enter in option 2 and look for existing accounts throu...
[2 replies] Last: Okay it's starting to make sense now, but when I put in an existing ac... (by Deadweight77)
Adding rows and columns in a 2d array
 
Hi all, I have been working on this problem for quite some time now, and can't seem to find the errors in my code. The problem is: Write a program to total each...
[6 replies] Last: The for ( A b : c ) { } is range-based for-loop syntax that appea... (by keskiverto)
strings and c-strings
 
Hello again , someone gave me a question to solve for string and it really got me confused. its something like this . input: ahmad ahmad output should be : Ahma...
[4 replies] Last: int size = a.length(); this is redundant. just use a.length() where y... (by jonnin)
What is a return value?
 
What is the return value of a function? How is it different from the answer a code calculates? And what is avoid function?
[3 replies] Last: int money() { int answer = 10+5; return answer; //Return a... (by zapshe)
by aligh
Is it possible to improve operator overloading using references?
 
I am learning C++ and I'm using code from a text book (although I do some minor edits). I have some questions about the code (mainly things like why not do this...
[9 replies] Last: Wow, thanks! That was totally new to me. So, the compiler doesn't allo... (by aligh)
Range-based for loop debug
 
I was expecting the code below to print out 1,2,3,5,6 and , however, did not show up. The second for loop might be problematic but I can't figure out. Can so...
[1 reply] : Ascii table says that value 3 corresponds to character ETX, which is... (by keskiverto)
A code to remove specific data from a file
 
HEre is my unfinished code hope you can help me with the removing system #include <iostream> #include <fstream> #include <stdlib.h> #include <iomanip> ...
[9 replies] Last: that is a load of code to do not much. all you need is this, with th... (by jonnin)
How to search a data in a txt file using fstream?
 
HOw to search a specific data in a txt file? im using fstream for a permanent storage of the data , i want a option to remove a data if its not needed anymore...
[7 replies] Last: - I’d open the same file again for writing That way you avoid the r... (by MikeStgt)
Matriz triangular superior com função
 
Bom dia, Estou com dificuldade em fazer uma questão de uma disciplina. Trata-se de elaborar uma matriz triangular superior com o uso de funções. Alguém p...
[2 replies] Last: matriz triangular superior -> upper triangular matrix (by jonnin)
Draw circle in child-window with OpenGL
 
I have an Eclipse program with a child-window inside a window. I can use OpenGL in Eclipse. How to draw a circle inside a child-window using OpenGL?
[3 replies] Last: I am using the newest version of OpenGL and the windowing library is w... (by bchinfosieeuw)
May 2019 Pages: 1... 34567... 16
  Archived months: [apr2019] [jun2019]

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