Beginners - June 2012

Simple median function crashing VS2010, 2008 and gcc
 
hi int median(int r){int imed,ibrr;imed = r/2;ibrr = r%2; if(ibrr){imed += 1;} return imed;} The simple median function above is crashing my program wh...
[6 replies] Last: the median function is wrong since when the array is split lets say on... (by Blessman11)
undefined reference to
 
Dear ALL, I am running my code, but it give me such error, Could you please let me know what is problem. Code: int file_open(char *filename); int...
[2 replies] Last: Thank you for the response. I didn't write completely. All thing is w... (by Elmaddin Guliyev)
Correct usage of functions
 
Hello everyone, From the moment I learned how to use functions, I've kind of been wondering whether I'm using them correctly or not. Considering I'm learning ...
[5 replies] Last: Thanks (by sfBlackfox)
A Nested Loop To Produce a Pattern?
 
Hi. I need to write a *Nested Loop* to produce the following pattern: 3 34 345 3456 Can anybody give me a hand? I could kind of guess that ...
[3 replies] Last: Thanks a lot for the answers! I totally understood how this works. Yo... (by Jibbian)
by digrev
string append
 
hi ,i am trying to append some strings using 2 string array and for loop but i couldnt make it something like this #include "stdafx.h" #include "stdl...
[1 reply] : Use code tags, the <> button! I am not sure what you are trying to do... (by stoffe1100)
multi thread ing
 
hi all i want to do part of project with multi threading in c++ but dont know ,how pass multi argument to thread in win 32 for example in this code myhan...
[2 replies] Last: As mentioned in kbw 's thread. Create a struct with all of the input... (by Stewbond)
Interesting code:blocks issues (1,2)
 
Alright so here's one for you. Yesterday, I get home after work and get on the computer. Go to open up code:blocks and I was getting an error message relatin...
[25 replies] Last: I did. Like I said earlier, the only thing it found was the program. (by ResidentBiscuit)
by fg109
What does a return of 0xC0000005 mean?
 
I am making a scheduling program as an exercise. What I have so far compiles fine, but when testing it, the program crashes when I hit this part: for (int i ...
[5 replies] Last: I figured out why the loop failed. It's because in the MyObject const... (by fg109)
Extracting parts of string separated by space character
 
Hi, I have a file with several lines, and these are it's contents: 1234561234561 aspirin 85 500 18/5/2012 1231234564567 cure 50 200 19/5/2012 1115559997...
[2 replies] Last: The simple way is to extract the line piece by piece: // File contai... (by Lowest0ne)
by Nelvin
A while loop problem
 
I'm new here i just started C++ about two weeks ago, so im still a beginner here. I need help from anyone of u guys to detect any errors. I wrote a "while loop"...
[4 replies] Last: lol, i didnt notice it, really a careless mistake... sry about that (by Nelvin)
algorithm count doesn't add last cell
 
Hi there :D I'm just trying my luck on some challenges I found on the internet, but I'm starting to have problems with the count algorithm. I pretty much have m...
[11 replies] Last: an even number of times or an odd number of times. Ah, okay. Carr... (by Lowest0ne)
by rgf7
sending txt file to an e_mail
 
Hello every body ,,, i want to send txt files from a folder to an e_mail account such as : Hotmail,Gmail,Aol....etc.. any body can give me the code ...
[3 replies] Last: Oh I am not sure how to do it with Windows, but you could give this a ... (by strongdrink)
by Mach
linker problem?
 
Here is a toy fruit class. If I compile it I get the error: Undefined symbols for architecture x86_64: "fruit::fruit(std::string, std::string, float)", re...
[4 replies] Last: Oh, it appears I should add a parametered constructor: fruit::fruit... (by Mach)
Inhering overloaded functions
 
Hi guys, Is there a way to inherit the overloaded functions from Sterling to Sterfrac? Please note I have not done pointers or virtual functions. If ther...
[5 replies] Last: Generally it's good to make everything private or protected, then pro... (by TheIdeasMan)
What's Next?
 
I've been studying general C++ programming for about 6 months now, so I'd like to say I've got a solid understanding of the basics. I continue to study daily w...
[9 replies] Last: Alright, I'll look into this stuff, thanks guys (by Phil123)
Redirecting Input File
 
I'm using command prompt to run my program and from what I know that redirecting input file can be done like this: program.exe<input.txt However, what I get is ...
[1 reply] : Bump. Any experts please comment about this. Thanks. (by LemonTea)
by Owain
Using GetAsyncKeyState() to accurately get keystrokes.
 
Hello. I wanted to write a program that could get keys pressed even when the program wasn't in focus. I tried using _getch(), which only partialy did what I wan...
[1 reply] : Hey there, i was looking for the values the GetAsyncKeyState() uses f... (by TheBeardedQuack)
for loop
 
can someone tell me the for loop for this one? 11, 22, 43, 74, 511 i try for( int y=11, x=11;x<=51 && y<=115 ; y=y+x, x=x+10) { cout<<y; cout<<", ...
[5 replies] Last: maybe it's a little bit difficult... btw, if you have anything to ask ... (by chipp)
Tic Tac Toe error
 
I am doing a Tic Tac Toe program and it compiles correctley (DevC++) and runs fine untill you enter 3 for the third place on the grid. As soon as any player hit...
[3 replies] Last: Thank you guys!!! if((GridA == GridA ) && (GridA == GridA ) && (G... (by Vagabond)
by djru
Well here we go again
 
I actually thought I was going to get this one on the first shot. The project calls for me to use to input files and create an output file. I have a name, id #...
[1 reply] : Your problem is that you are not able to pass ofstream/ifstream object... (by Hippogriff)
June 2012 Pages: 123... 51
  Archived months: [may2012] [jul2012]

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