Beginners (Page 76)

by tdk93
what's wrong with a>b?return(a):return(b);
What's wrong with the following expression? Why does it throw an error? (a>b)?(return a):(r...
[1 reply] : return a is not an expression. a>b ? a : b is an expression. Eith... (by JLBorges)
Returning array in C
I am writing a program that needs to return the number of values that are divisible by 3 and 7 and t...
[3 replies] Last: Instead of returning an array from the function, we can fill an array ... (by JLBorges)
by Life24
Space ascii code
Hi, I want get number while user insert space with ascii code(32) What i do? The below code doesn...
[6 replies] Last: const int SPACE = 32 ; // hard-coded code-point for space (32) assert... (by JLBorges)
help with maze program C++
My program is supposed realize that it has hit a 'K', which is a key to unlock a door, and store it....
[3 replies] Last: If you are referring to removing the key once you have collected it t... (by Softrix)
by Nezar
I can't find the bug in this code
I'm trying to write a program that return the number of occurrence of a sequence of letters in a str...
[5 replies] Last: Hey guys, Thank u for the solutions, it worked. To be honest, i didn't... (by Nezar)
The code bellow seems to enter infinite loop, why is that? Thanks. #include <iostream> #in...
[3 replies] Last: wait you are right. Everything works fine now, i missed one definition... (by LayMuon)
Pushing elements from front of deque to the back
Hello, I'm wondering what the proper syntax is for this. I have a deque of pointers to class objects...
[2 replies] Last: Ahh, just noticed that as well. Thanks for the quick response! I had f... (by hinesro)
by sambos
Reading from files with Win Form App
Hi, I've written a program that has quite a number of labels. The program is a Windows Applicatio...
[no replies]
Strings and binary data
This works fine char* mem; int bnum; GetFileCont("Capture.PNG", 0, 5000000, mem, bnum); ofstream...
[7 replies] Last: Alternatively: char* mem; int bnum; GetFileCont("Capture.PNG... (by cire)
Need help with reading into array
i have a project that requires me to read all records from a disk file. (the record structure: name ...
[1 reply] : i have figured out most of it , just having some problems with my sort... (by darrrkjin)
I need help understanding what is wrong with my program. I have read about if-statements on this web...
[7 replies] Last: Thanks for the help :) (by BLANKE)
Small Problem
Okay so this is what should be a simple enough code, i just want to create a function that will decr...
[1 reply] : Your function doesn't do anything to modify your other values. It cr... (by Ganado)
by CDavis
finding lowest grade of a 2D array
I have it to where the it checks the column for the lowest but at the very end it just spits out a g...
[1 reply] : Why do you need a 2D array for a list of grades? Someone could help if... (by Ganado)
by Ganado
Question about pointers/address addition
If I have double a = {10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0}; double* ptr =...
[2 replies] Last: Alright, thanks for the quick reply. (by Ganado)
The following code compiles runs, and usually gives the expected result but it contains a serious fl...
[14 replies] Last: You should be assigning the values that pointers are pointing to. i... (by Ganado)
Creating a function
Normalising a set of data points to the interval [0,1]. Each data point is normalised as follows: P...
[1 reply] : I think it would need two passes through the array. First, simply find... (by Chervil)
by p al
Vector of vectors
Hi guys, I read somewhere that if you have sth like this: //cin>>CC; cin>>RR; already done vector<...
[4 replies] Last: Thank you so much!!! (by p al)
I need to make this code work with vectors? How can I do it ?
[5 replies] Last: That still has logical issues. Line 13. Do not trust that the file ha... (by keskiverto)
Star Pyramid Manipualtion (1,2)
If I have the following code that produces a center aligned pyramid, how can i remove the middle sta...
[27 replies] Last: Thanks again! (by JasonMcG)
Is it safe to delete[] of NULL?
int *p = NULL; delete p;
[5 replies] Last: That's the whole point of setting pointers to NULL after deletion is t... (by NoXzema)
Pages: 1... 7475767778... 88
  Archived months: [may2014]

Cannot post in this page. To post a new message, go to the first page.