General C++ Programming - January 2012 (Page 2)

by juba92
i need help in pausing the output
 
i want to display "hello...." as an output but only one dot appears every second i.e: after 1 second "hello." after 2 seconds"hello.." after 3 seconds"hell...
[4 replies] Last: Please read: http://www.cplusplus.com/forum/beginner/27441/#msg146817 (by Duthomhas)
How would I add these elements?
 
I have a 2D array of ints that looks something like this: I want to add the diagonal values of this matrix (1+5+9 and 3+5+7). How can I do this? Th...
[9 replies] Last: The only damned ones are those who never make mistakes. Don't worry ab... (by Duthomhas)
by cyrxe
Help with Linked List.
 
Hi. So here's the deal, I'm making a linked list program and everything went smoothly, until I added a if else statement in my remove method to try to catch whe...
[3 replies] Last: Got it sorted out. Thanks for the help ne555. I did not think that it ... (by cyrxe)
reversing a vector
 
The point of this lab is to read in a pgm file and horizontally flip it. I can't figure out why what i have wont flip every row. it works for some of the smalle...
[2 replies] Last: yeah, switching the rows and columns did it. thank you so much! and s... (by gamernchrist)
Second attempt at a team.
 
Hey guys. In case you do not remember a few months ago around the time of august I posted a question on here asking about creating a RPG team. It ended with the...
[no replies]
how to check if data carrier is inserted?
 
i googled for quite a lot of time but i haven't found anything... i'm looking for a way to check if a data carrier is inserted: i have 4 free interfaces ( I:\ J...
[6 replies] Last: thanks to all... but i finally solved it by writing the info about the... (by MDell95)
by theph
Unexpected Modification of Variable
 
Hello! I have a weird problem and I just can't find the reason. I am rather new to c++ so I was hoping, that one of you might find the error. The Problem...
[4 replies] Last: Hey Cubbi, Hey LB, thanks for your help. The Tip with the pointer was... (by theph)
by arefe
Saving a binary file
 
I tried to put some decimal numbers and save it as a binary numbers in the hard drive .rft file.I wrote the code but somehow its not works. Any help for that? ...
[18 replies] Last: Thanks for promptly respond. I finally cleared these two issues :) Tha... (by jumper007)
C++ ID numbers Batching Simulation
 
Our project is specified in the following details: You are to work with a student population whose ID numbers range from 110001 thru 111999 (there are 1999 s...
[1 reply] : Well, just a beginner or not, you need to put some effort in this. Yo... (by webJose)
Casting pointers to objects
 
Is there a way to cast a pointer so that instead of using (*iterator)-> I can just use iterator-> ?
[2 replies] Last: Cubbi's solution is probably the most professional. If you, however, ... (by webJose)
Quicksort assistance
 
Hi all, I am starting to understand how recursion works, but there are still spots I am unsure, here is the code I have so far, the problems I have are: 1)ho...
[2 replies] Last: I will take a look at the link, but as for my code, as you can see aft... (by closed account 4ET0pfjN)
by h9uest
Run Time Type Identification
 
Hi: It might be a misuse of RTTI as I've read a few articles on RTTI, and they seem to tackle different issues from mine. Here's my problem: Let's say ...
[4 replies] Last: @OsiumFramework: Thanks a lot for the answer! But you're not even usin... (by h9uest)
Ticketing Portal SHOWTIME DISPLAY PROBLEM
 
I was having a problem with this part of my code below: Please Jump to Case 5 in the Main Switch Case not the Sub-Switch Case (USING NESTED SWITCH CASE) dire...
[3 replies] Last: Thank you but I and my friend figured out the logic! :D (by Pranav Singhania)
doubt in a singleton factory method
 
Hi, I am trying following program $ cat singleton.cpp #include<iostream> using namespace std; class singleton { private: static bool instance; ...
[2 replies] Last: Why is it a pointer? That's adding so much complexity to the otherwise... (by Cubbi)
system() codes
 
in cmd you can change a reg_sz with writing reg add HKCU\Control" "Panel\Colors /v Window /d 255" "255" "255 /f but in c++ i wrote that one it worked syste...
[5 replies] Last: Does the command work if you run it from a batch file? EDIT: Altern... (by Computergeek01)
algorithm running time complexity
 
Can someone explain to me why O(nlogn) is better than O(logn)? Isn't there more operations with O(nlogn)?
[1 reply] : Your suspicion is right, O(nlogn) is not better than O(logn). (by shacktar)
by Syok
Sequence of numbers, periods, repeating subsequences...
 
Hi. I need to write a program that checks if a sequence of numbers entered by the user is periodic(by saying periodic I mean that the whole sequence consists on...
[13 replies] Last: Hey Syok, I wonder if you are still subscribing to this forum. If yo... (by matt1011)
Is scanf faster than cin??
 
I have read an article on solving SPOJ Problems. The author says that scanf() and printf() are three times faster than cin and cout. Is this true
[4 replies] Last: Why are you even asking that question? Is there any particular reason ... (by hanst99)
Delete repeated lines in a string with getline
 
Hi!. I'm stuck in a function which in theory, should recibe a complete string, split per line (as they have a delimiter '\n') and eliminate duplicate, triplicat...
[5 replies] Last: Hi Cubbi, thanks!! the unique_copy has solved the problem!!... Nice pi... (by MacGregor)
by gomsi
read data from hard disk partition with no file system
 
i have 7 partition in my HDD some are formatted with fat32 filesystem and last(7th) partation have no file system.. i want to write a c++ program to display so...
[1 reply] : In linux everything is a file, so read as every other file using ifstr... (by modoran)
January 2012 Pages: 1234... 36
  Archived months: [dec2011] [feb2012]

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