General C++ Programming - May 2011 (Page 20)

Help for read txt file!
 
Here is my code for read a txt file. which i want to read 3 numbers each line, first two is two nodes and the second is the length of two nodes, for example 1 2...
[no replies]
by daking
Cant Access Folders with Spaces in the name
 
I am having a slight problem. On trying to access a file at a directory I am getting a error. It only happens if a folder in the directory has in a space in the...
[4 replies] Last: what would the ShellExecute() instruction look like for my example? (by daking)
Memory pool & char array questions.
 
Hi, I was recently assigned a project and I'm looking for a little advice. I have to implement a memory manager that has a char array for a memory pool. S...
[8 replies] Last: After a good days work, everything seems to be working correctly. List... (by ghostfacelz)
by cemtkr
How to Write a function factorial
 
The question is "Write a function factorial, which calculates the factorial of an integer. " so how can i write this function please aid me!
[18 replies] Last: Ok, this is it: typedef whatever_you_want fact_type; fact_type facto... (by webJose)
1+1 and 1+100, theoretically, is there any execution speed difference?
 
I mean, How does the computer do computing? 1+100 is executing like 1+1+1+1...repeatling 100 times? how about 2*2 and 2*100? or 1*1 and 1*100?
[12 replies] Last: http://en.wikipedia.org/wiki/Central_processing_unit (by closed account S6k9GNh0)
Generating substrings of a string
 
I am trying to create programs to generate substrings of a string and also subsets of characters of a string. For the substrings of the string "rum" there ar...
[1 reply] : The differences between subsets and substrings are two: 1. substrings ... (by Duthomhas)
Trouble finding problem. Please help.
 
Alright, so I have coded this program so far and it compiles just fine. It crashes after reading user input for the 10th score, so after the 1st FOR loop. I ca...
[18 replies] Last: @savavampir You've helped me out a great deal. It is much appreciated... (by N1ghtm4r3)
by Moppy
Random printing
 
What this is supposed to do is find an x and y coordinate on the window and print a line of #'s in a random direction, with a random amount of #'s. #include...
[no replies]
by NeoXX
Help with assignemtn
 
I'm sorry if this will sound like low-level programming, but I need help completing my assignment: I have to make a program, that would read massifs from txt f...
[1 reply] : massif means array (by NeoXX)
C++ help (1,2)
 
Hey guys, this is an assignment, i don't want it all done for me i just want some help to get on the right track. the one thing im struggling with is how to pro...
[24 replies] Last: Before this topic gets buried deep into abyss to i would like to ask f... (by savavampir)
Trouble using strings in user-made functions
 
Hello. I'm currently writing my own function that accepts a string and then prints it to the screen one character at a time to make it look like it is being typ...
[4 replies] Last: In the directory of include files for most compilers there is an "iost... (by LB)
File Handling
 
the read function of my Cell management class does not read from the file rather it gives[ garbage values. Please tell me if i'm doing something wrong here. ...
[3 replies] Last: As coder777 said, you can't write references (pointers). Pointers ref... (by abellia)
Dynamic multidimensional array problem
 
I asked a question on stackoverflow.com, but I haven't recieved the corecct answer. So, I'll repost this question here 'm developing a 2d-platformer. Every...
[14 replies] Last: Oh, I'm so full of work :( And now I'll just re-edit some functions at... (by Moarthenfeeling)
by fafner
segfault in empty function
 
I have a fairly large codebase, so pinpointing this error is probably quite difficult, but I'll try anyway. I'm getting this error from gdb: Program receive...
[17 replies] Last: That's exactly what they don't! I figured it out while I was rewriting... (by fafner)
find, replace, and count words and characters (1,2)
 
So my project includes 4 parts, find the lines a word is on, replace that word with another, count the characters in the file, and count the words in the file. ...
[31 replies] Last: hmm well ive been working on this in my free time and i have the word ... (by xiddus)
Does a reference have its own memory address?
 
I write a code like this: #include<vector> #include<string> #include<iostream> using namespace std; int main() { int v=1; int &r=v; int *pv=&v;...
[5 replies] Last: Variables get put at a memory location. The program accesses those va... (by Disch)
by kaa999
help with password.exe file (1,2)
 
Hi every one i have a file called password.exe , i have to use the CMD.exe command to run it. The way that this program work is to write this command in comman...
[29 replies] Last: Disassembly. (by helios)
by tayf
about 'loop'. help me please..
 
hi my friends ı have a problem that ı have to solve but ı cant.now ı will enter a =5.after that ı need odd and even number checker.if the number is odd(fir...
[1 reply] : Repost: http://cplusplus.com/forum/beginner/42801/ (by Disch)
selective erase from associative container
 
hello, I use std::tr1::unordered_map and I want to erase all unreferenced resources from the map, to do so, I simply looked at their resource count if it is 1 I...
[1 reply] : this one is worked void ResourceManager::removeUnreferancedResour... (by afraidofdark)
srand?
 
i need some help in a random repetition of functions... plz reply some1 help and to knw wat to use wat functions!
[1 reply] : http://www.cplusplus.com/forum/beginner/39274/#msg211862 (by kbw)
May 2011 Pages: 1... 1819202122... 32
  Archived months: [apr2011] [jun2011]

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