General C++ Programming - December 2014 (Page 13)

by farfar
Do i need to use pointers for this?
 
The first input line contains the single integer N (1 ≤ N ≤ 100) – the number of pixels on the side of new square monitor. It is followed by N lines, ea...
[2 replies] Last: No it doesn't say anything like that. I asked the professor and he tol... (by farfar)
Deleting a unique_ptr
 
I have a unique_ptr that is stored in multiple vectors, and I don't want to manually take it out of scope by removing it from every vector. Would deleting th...
[1 reply] : > I have a unique_ptr that is stored in multiple vectors The semantic... (by JLBorges)
Open all .exe in a folder
 
I need to make a program that will go through the folder it is in and open all exes that are in it. I can't really find anything on google about it. I'm using w...
[2 replies] Last: The Microsoft implementation includes the draft TR2 filesystem library... (by JLBorges)
Vector of classes problem
 
Hello, im passing a vector of a class to a function of another class. But i cant access the data on the classes inside the vector. Something like that: ...
[5 replies] Last: THANK YOU cire!! The error was on my copy ctor. CDummy::CDummy(co... (by bigorenski)
Recursive vs Loops
 
I am trying to convert a recursive function to a loop. However, it is not working. Please advise what I am doing wrong. Thanks in advance! //recursive functio...
[1 reply] : A loop with an unconditional return in the body is not a loop. (by cire)
Faro shuffle doubly linked list troubles.
 
I'm trying to perform a perfect shuffle on a doubly linked list and am running into some issues that I cannot handle. I'm able to split the linked list into tw...
[no replies]
static vs. dynamic binding
 
Static vs. dynamic binding. Which should i use, and when should I use each of these?
[no replies]
regex "\\" does not match string("\\")
 
The title says it all. I have been trying to run this for a while and can't figure out why; regex ex("\\"); string str="\\"; bool m1=regex_search(str,e...
[3 replies] Last: > One of the things lacking in C++ is the ability for "raw" strings wh... (by JLBorges)
by c noob
problem with class code
 
Undo Stack Using Circular Buffer I have to write a main program that pushes numbers on the stack and pushing more numbers than the stack capacity. I have to te...
[18 replies] Last: I try option 2 and I still get lldb in Xcode. #include <iostream> #in... (by c noob)
trying to write to a file
 
I'm trying to use a function to gather all inputted data and write that data to a file. I'm having trouble getting it to work. #include <iostream> #include...
[1 reply] : Near the end of the program in the saveExpense function, remove the li... (by AaronZim)
Using If-If only statement
 
Just a hitch up. I've been doing this already but can't seem to make it run and sorry I haven't replied to my first topic already. Been busy on some other stuff...
[5 replies] Last: @TheIdeasMan You're right: I'll keep that in mind. Seasons greetin... (by minomic)
by Xhobi
i++ & ++i
 
Can any one tell me difference between i++ and ++i. As i know i++ stands for i=i+1 but what is ++i?
[1 reply] : You can read here: http://www.hotscripts.com/forums/c-c/57931-c-tip-wh... (by minomic)
Array
 
Hello, I want to input only 4(numbers)from a .txt file like Number of Plants: 4 Now where I have to change for this. please let me know #includ...
[10 replies] Last: yes you are right after that I'll calculate using those array Thank yo... (by shuvoshill)
help in string combinations
 
hii I have a list having m1 m2 m3........ m922 and in each there are a1 a2 a3 a4 are there like m1=a1 a2 a3 a4 a5 a6 m2=a1 a2 a3 a4 a5 a6 m3=a1 a3 a5 a...
[5 replies] Last: yes exactly like this Likewise, splitting a string at all possible com... (by ameetpawar00)
PortAudio input-to-output wire has too much delay
 
I'm trying to create a wire from input to output with near zero latency. The framesPerBuffer is almost definately the problem. When I call Pa_OpenStream I pass ...
[no replies]
this is my program do i answer the question??
 
i also cannot get the sum for even and odd number, it just give me rubbish number.... #include<iostream> using namespace std; int main() { int x ,odd=0,ev...
[1 reply] : You were not initializing the variables evenArray and oddArray to zero... (by minomic)
phone application
 
// error msg: expexted primary-expression int main(int argc, char** argv) { // open main string nm; string np; string msg; int gid, choice, c...
[1 reply] : in function showMenu has 3 option.. 1 for contact info, 2 for message,... (by fnabila23)
by hp16
What's wrong with my merge sort code?
 
It's working but it's doing something funny if my input is: 1 7 4 0 9 4 8 8 2 4 my output is: 2 8 8 8 9 9 9 9 9 4 What is wrong with my code? #in...
[no replies]
Need Help, important and probably simple
 
I have no idea why it is doing what it is doing. I have it searching through the entire string letter by letter, looking for spaces, punctuation, etc... yet it ...
[4 replies] Last: Thanks for the idea to remove the whitespace before. It works, I also ... (by elite zero)
read file fstream
 
i have a file *.csv. CSV is like excel format the first line is the number of element lines after is customer info (include: name(string), sex(bool 1/0), ID(str...
[14 replies] Last: Here is my code following ur tips. thks. #include <iostream> #includ... (by nightmaregiba)
December 2014 Pages: 1... 1112131415... 31
  Archived months: [nov2014] [jan2015]

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