General C++ Programming - July 2012 (Page 10)

Dividing an array into blocks
 
Given an array of size L1xL2 divide the array by blocks of 8x8. For example the size of the array is 16x16 so there will be four blocks of 8x8. I can only ge...
[13 replies] Last: Ok thanks I will try again (by projectUser)
Kbhit
 
hi i want to write infinite loop which only terminates if the Ctrl-c is pressed from the keyboard.How do i use kbhit to do this?
[3 replies] Last: use getch, and check if the result is the number 3 (by viliml)
by helios
Weird get() behavior
 
So, I was trying out building my engine with Clang and I couldn't get it to work at all. Eventually, I managed to narrow the problem down to a lexer that relies...
[no replies]
by dancks
confusing segmentation fault?
 
This is a supporting source file of a larger (but still pretty small) game. Yeah this is kind of a repeat of my earlier thread but I got rid of the linked li...
[4 replies] Last: it was. I initialized it. Problem Solved. Thanks. (by dancks)
by bxdin
Get Array size to update after using a pop back function?
 
I have marked the area of interest in long asterisk marks. The program executes properly, but it fails to adjust/update the size of the array, requiring me to ...
[4 replies] Last: nm (by IceThatJaw)
time() function and random number generation
 
Often times, the time() function is called with parameter 0. I tried reading the documentation of the time() function, but I had trouble understanding it. So i...
[2 replies] Last: @helios, I see, thanks! (by Flurite)
trying pass 2d array through function and output adjusted array
 
This isn't complete code I just wanted to simplified to get to point of whatever I'm having a problem. I can compile but it won't pass the values through he fun...
[1 reply] : you are returning the number that is 4 places beyond the last value de... (by viliml)
set_symmetric_difference... ?
 
Let: array1 = {1,2,3,4,5} || vector<int> array1; array1.reserve(100); array2 = {1,3,4,5} || vector<int> array2; array2.reserve(100); result = {} ...
[2 replies] Last: Thanks again Peter :) (by jumper007)
Got an issue with STL iterators
 
I am not sure why but my program is crashing when I compile it if I use the following part of code: // code... typedef long long Lung; // code... vector<Lung...
[8 replies] Last: ----------------------------------------------------------------------... (by jumper007)
polyphonic music player- Complete
 
This is a program i was working on you can play the 2 default songs or make your own. If any one knows a way i could save the song onto a text file then load it...
[1 reply] : PlayC(int n , int L ) (by soranz)
Help with passing array through function
 
I'm trying to get the inverse of a matrices. I pass the array through the function to get the inverse. Then I would like to print out that matrix. I having p...
[1 reply] : float ? float main() should return a code at the end (int main is stan... (by soranz)
Adding variable(s) subscript to variable(s) for equation writing
 
https://dl.dropbox.com/u/92979563/checkss.png Kindly see this image. I am willing to get output somewhat like this. It is having variable with variable sub...
[1 reply] : yes it's possible, use unicode. It's no different than writting this... (by soranz)
Search ids
 
I was wondering how I would be able to search through a file for a certain word and number. Here is my code: #include <iostream> #include <fstream> u...
[1 reply] : Prefer using std::string over arrays of char. http://www.yolinux.com... (by JLBorges)
by Qqite
Problem with constructors w/ threads (boost)
 
So I'm having a very odd problem that I must be overlooking. I've been stuck on this for a couple of hours and hopefully its just a stupid mistake. I have a ...
[10 replies] Last: Aha! Thank you so much for your help! You all have helped a lot. (by Qqite)
Where to get exposure on Application development in C/C++
 
I need your help. I have been learning C/C++ for the last 1-1.5 years. Currently I am in SAP administration but want to switch to programming domain. I have goo...
[2 replies] Last: Hi iHutch, Thanks a ton for your reply! I noted your advice of c# for... (by assasinC)
Return value for function
 
I'm trying to write a program to list the notes in a scale, based on input from the user. Here's what I've got so far: #include<iostream> #include<string> ...
[2 replies] Last: Awesome, that was it. Thanks a ton catcat. (by DeadH34d)
Problem with a Function
 
Whenever I run my program instead of doing the calculation, it just skips it. Also when I run my program Visual C++ doesn't give me any errors. Here is my code...
[1 reply] : You aren't actually calling the function. On line 29 you are declarin... (by CoAstroGeek)
Help With Tic Tac Toe
 
So I'm making a Tic Tac Toe Game and I've gotten into it an then encountered a problem with this code: #include <iostream> using namespace std; string square...
[5 replies] Last: This is also not the most efficient but a bit more efficient than your... (by Gkcha0z)
How to convert GUID values
 
Hi, This is my first time posting here, but I have found many solutions to programming problems here before. I appreciate the help in the past. However, I di...
[4 replies] Last: how can I go from a GUID ... to the format mentioned above? The GUID ... (by kbw)
help me work with for(;;)
 
hello ; I write this program but it's have some error please help me to work it and Tell me what the problem! (sum of matrix 2*2) #include <iostream> #in...
[2 replies] Last: not that its related to your error, but you should use int main, not v... (by Zephilinox)
July 2012 Pages: 1... 89101112... 30
  Archived months: [jun2012] [aug2012]

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