General C++ Programming - July 2013

Deleting files PLEASE HELP!
 
I am trying to teach myself file I/O by making a address book program where the user can create, edit, and list all of their contacts. The issue I am having is ...
[5 replies] Last: I get it now! I was trying to delete the file while it was still in us... (by iiApexii)
push back in 2D vectors ?
 
Hello I am trying to use push back in a 2D vector but I don't know how to. This is what I have: vector <vector <BigInt> > matr; for (BigInt i=0;i<rij;i++...
[2 replies] Last: Thank you (by gelatine)
milliseconds system time
 
I am a bit lost as I am new to C++ and programming in general. Can someone please help me with the following code. #include <stdlib.h> #include <stdio.h> #...
[3 replies] Last: Thanks Cire. (by MilanChamling)
Storing entire one array into one cell of another array
 
Take for example two arrays. int A = { {{1, 2}, {3, 4}},{{ 5, 6}, {7, 8}} }; int B I want to store the entire array "A" into B . Is it possible?...
[2 replies] Last: I am sorry! There is a way to store the whole array A in B . As array... (by vlad from moscow)
Declaring array depth
 
Lets say that I need setup an array to store some information in a file and the file tells me how many dimensions this data wants and how long each array is in ...
[9 replies] Last: Yeah I know what he meant, but I'm just saying that the fact is someti... (by TheBeardedQuack)
Passing some part of a multiDimensional Array to a Function
 
Hi! How can I Passe some part of multi-Dimensional Array to a Function; for example only two dimension of three dimension of a an array with 3 dimension. This...
[3 replies] Last: For the array you used in the post (assume that it has type specifier ... (by vlad from moscow)
Initializing a local one dimension array in c
 
Want to initialize a local one dimensional array. How can I do the same without a loop? Found from some links that int iArrayValue ={0}; will initialize a...
[7 replies] Last: I was addressing then why int iArrayValue ={4}; is not converted t... (by closed account z05DSL3A)
by dgsm98
What's wrong ?
 
I dont know what is wrong with my code so far...I just started the game and for some reason it says its failed . // First Complex Game #include <iostream>...
[3 replies] Last: could you post your code then? and i mean like did you type in for nam... (by closed account Dy7SLyTq)
by nt162
delete pointer in vector
 
Hello! I'm tying to create a program that evaluates all possible actions for a certain problem. So what i'm basically trying to do is to create a sequence...
[6 replies] Last: well actually i don't see why i shouldn't (and it works just fine by t... (by nt162)
detect mouse position
 
Im trying to detect when my mouse is over a item. i can get it working if its a square shape an stuff. (LOWORD(lParam) > 133) && (LOWORD(lParam) < 154) && (HI...
[7 replies] Last: well my button is part of a image an its a irregular shape so thats wh... (by poohpooh)
by dgsm98
Confused on choices.
 
Hello everyone, I am currently programming a text - based game in c++. It is a fantasy/medieval RPG. Now you are able to set a class type, the three classes are...
[3 replies] Last: just fyi... in c++ you cant do a switch on strings without writing spe... (by closed account Dy7SLyTq)
Access to array by string of its name
 
I have an array called abee1. int abee1 ; I have done some string function (like: "abee" + "1" ) and have "abee1" as string which is the same as abee1. H...
[4 replies] Last: [quote=mosahab]I do not spam Well you have at least 4 posts about th... (by TheIdeasMan)
by meesa
Best way to store this data
 
I'll be using a much smaller example, for simplicity. I have three parts of data; a character, an integer, and a float. 'A', 2, 4.0 'B', 7, 3.825 'C', 5...
[5 replies] Last: Thanks Andy, always appreciate your expert advice :+) (by TheIdeasMan)
[C++] Paired array and map: removing elements
 
Hi, I have a problem with array and map. Suppose I have an array of int of fixed size. Each new element is added to array after the last filled element. Whil...
[3 replies] Last: i think a structure that uses normal arrays will always be inefficient... (by Rechard3)
arrey dimension
 
hi all; how many dimension this arrey have? vector<vector<int>> opp ;
[2 replies] Last: vector<vector<int>> opp isn't a 2-dimensional vector; it's a vector ... (by andywestken)
Reaching data of differet array using pointer in the loop
 
My problem is as following. I have 3 arrays named: abee1 , abee2, myarray. I have loop that want to call abee1 , abee2 one each time and copy myarray into it ...
[1 reply] : You can't create a string and then use it as the name of an object in ... (by MikeyBoy)
Access to data of array while I have its name as string
 
The problem is as following. First, I have 21 arrays named: integer abee1, abee2, ... , abee20 and myarray all with the same dimension of . Next, in a loop ...
[2 replies] Last: You can't do what you want because C++ is not reflexive; the variable ... (by Zhuge)
HyperCube permutation
 
Hi everybody, I faced with a mathematical problem. I know completely the problem, I found its computational complexity, and I have written several programs, but...
[6 replies] Last: Thanks a lot! I wrote the program down in a special way.. (by Afshord)
operator overloading + (adding values of arrays)
 
im trying to overload + operator; i have done a several time with simple objects for example PROTOTYPE: friend className operator + (const className &...
[no replies]
The x++ and ++x operators
 
Hi, I'm newbie in programming. I hope can find answer in this forum. First of all, I have a program/code like this: int a, b a = 1; b = a++; cou...
[2 replies] Last: I see now...thank you so much... ^_^ Thank you for the explaination..... (by cubluwt)
July 2013 Pages: 123... 34
  Archived months: [jun2013] [aug2013]

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