General C++ Programming - February 2011 (Page 20)

by Janman
What should I learn next?
 
Hello I primary want to be a software developer, and secondary I want to be game programmer. I have the book "Learn c++ in 21 days" from Jesse Libery, and I h...
[6 replies] Last: @Athar +1 Wow -- I had no idea that any Intro to C++ book would ski... (by PanGalactic)
For loop problem
 
Hello:D in the code below, I am making a verticle histogram. I input an array like this 1 2 3 4 5 0 and it will print ----* ---** --*** -**** ***** My...
[1 reply] : NEvermind got it thanks guys for lookin ;D (by tkauffman2)
Passing Object Arrays Between Functions
 
Hi, I can't figure out how to pass arrays between functions, in particular as to how to get an array to return. For example: #include <iostream> using...
[6 replies] Last: Thanks! It's interesting how it is set up that way. (by zimbloggy)
Enetering Text to Website text box
 
Hi, I am trying to think up or find some code to be able to go to any website and locate a box where text can be entered, enter it, and then click the button...
[1 reply] : 1. locate a box So not a specific website... because that would... (by king214)
erasing a vector element with an iterator
 
The following code causes a debug assertion in the vector class when trying to increment the iterator after the if statement is true and erase is called. Do...
[2 replies] Last: ah great thanks Disch (by quirkyusername)
How to find a max number from an integer
 
Can somebody please help me out ! i want to make program in which we input a integer and it gives output the maximum number. e.g if i give 1232 it will outpu...
[3 replies] Last: Hint: Try a third variable for the right-hand-side of your % that incr... (by Albatross)
by tcs
Default pointer initialization
 
Hi, when writing a template I sometimes need to initialize an attribute of a given template parameter type. This may be any class or even a pointer type. F.e...
[3 replies] Last: Quite right! (by kbw)
Trouble with array program
 
This program is supposed to collect player's names and scores in different arrays and then display them to the user. It is also supposed to average the players...
[5 replies] Last: There are some errors - small, but very significant. You use the va... (by simeonz)
by eepty
Declaration and definition of pointer
 
I want to write a code to control a real time clock(RTC) IC. The RTC uses I2C communication and it act as a slave. my micro-controller is the host. I find a lib...
[1 reply] : You cannot implicitly convert "const char *" to "char *". This is a... (by Abramus)
Weird parameter to function
 
I am trying to use a particular function found online, but one of the parameters is weird: Here is the function: WorleyNoise::noise3D(float at , long maxOrd...
[2 replies] Last: wow I feel retarded, thank you though! =D (by rpardrid)
String/Char Sorting Question
 
I was wondering when sorting, lets say by low to high, how does a string or a character sort know what's low and high? Does it add the ASCII representation of t...
[2 replies] Last: Yeah that's weird...I'm sure someone has programmed something that che... (by kraigballa)
program keeps crashing at stdin reading
 
#include <stdio.h> #include <stdlib.h> static void binsortu(const int N); int compare (const void* a, const void* b); int main() { //test binsor...
[1 reply] : Line 33: you never increase the size of your c_array. You need to kee... (by PanGalactic)
by dhv
Recursive function returns subscript of first negative element in array
 
int firstNegative(const double a , int n) { if (n < 1) return -1; if (a < 0) return ???; return firstNegative(a+1, n-1); } I need help implementin...
[14 replies] Last: Thank you simeonz! Im also working on this problem rite now and your s... (by crosby0371)
by straff
Basic C++ programming issues / arrays + loops
 
Hey guys!, i'm new to the forum, so Hi!, i suppose is the first appropriate thing i should do, looking forward to getting back into programming and re-developin...
[2 replies] Last: Here is some tip from me: Use two character arrays - one holds the ... (by simeonz)
Find the max in a user-inputed array
 
Hello again, In the code below I have the user input a list of ints in terminal, like this 1 2 3 4 5 it will output * * * * * * * * * * * * * * *...
[3 replies] Last: I assume that the columns have to be aligned on the bottom of the grap... (by simeonz)
Qt configuration error
 
I try to go to the qt command prompt and run configure -platform win32-msvc2010 and it ends up with "Makefile(168) : Fatal error U1088: invalid separator '::...
[2 replies] Last: forget it, i had nmake in my sys32 folder, and it screwed things up. d... (by closed account 4Gb4jE8b)
Trying to open 2 files one to read in and the other for output
 
however all the books I have bought are crap they deal with OOP and almost nothing is said about files except that ios::app appends ...etc. I am trying to read...
[4 replies] Last: Thanks I looked for a tutorial but must have overlooked it. (by Onceler)
Screenshot code
 
Hi I am trying to add a piece of software into my Visual C++ program to take a screenshot of the desktop screen several times and save the images in a folder...
[2 replies] Last: Duoas Thank you very much for your help I am trying your sugges... (by Yohanna)
Qt error
 
Every time i build a qt app in MSVS2010 i get a side by side configuration error. here's what i did (also posted on another forum, as i do understand this isn't...
[4 replies] Last: umm i'm a total noob with Qt... so i don't really know how to do that,... (by closed account 4Gb4jE8b)
palindrome..... (1,2)
 
Q. Write a function to check weather a string is palindrome or not. The function will return 'y' if the passed string is a palindrome otherwise 'n' will be retu...
[23 replies] Last: Here is a code written in Visual c++ 2010 form application #pragm... (by eduard77)
February 2011 Pages: 1... 1819202122... 25
  Archived months: [jan2011] [mar2011]

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