General C++ Programming - December 2010 (Page 11)

Am I doing this right?
 
Boy scout chocolate sales. The output should be arranged depending on the amount of chocolates sold. Example; the lowest amount should always be at third place....
[3 replies] Last: "By the way these if statements cancel each other out, the second con... (by Elmofongo)
Vectors and Pointers ?'s
 
lets say i have a Vector that holds pointers to a custom class. then i loop this 10 times to get 10 ?elements? inside the vector std::vector< Ccustom* ...
[3 replies] Last: I'd say nothing wrong with swap? std::swap(v.front(), v.back()); ... (by coder777)
by ajitm
Why we have pointers with diffrent types
 
Hi I am very Igor to know why we have different types of pointer as we can use Void pointer for all data types. Then what the reason to have pointes with diff ...
[3 replies] Last: Also, pointer arithmetic doesn't work if you don't know the size of th... (by kbw)
by aatwo
2's Compliment Checksum
 
Hi guys. I am trying to calculate the 2's compliment checksum of an array of characters using the following code: unsigned long long end = 512; unsigned ...
[2 replies] Last: Thanks that was very helpful. I think I was trying over complicate thi... (by aatwo)
including and linking libraries
 
Hi, What's the difference between including a library and linking to a library? I have seen some programs include a library. Could they have done with jus...
[3 replies] Last: you're welcome :) (by aatwo)
In search of best algorithm
 
I am in need of best algorithm for a problem. Problem: There are two arrays array1 and array2 each containing thousand elements. The common elements between bo...
[1 reply] : http://www.cplusplus.com/reference/algorithm/set_intersection/ (by sohguanh)
by trig
GUI design vs08
 
hi, i was wondering if anyone knows a really good website or something that teaches you how to create a gui program in visual studios 2008 using their tools and...
[4 replies] Last: Then you should probably try and enroll in a programming introduction ... (by Zaita)
Word and Letter Frequency
 
Hello all, I'm very aware that people don't just give out code, but I've been stuck on this for a good 4 hours now. If anyone could look at my code and tell...
[6 replies] Last: Thank you so much Shredded. That was just what I needed - it seems my... (by magnahawk)
by xephon
Problem regarding cmath header
 
I have a project currently using cmath header for cos(x) and sin(x) functions. all variables are float. currently, i have a problem of "too high" precision. ...
[3 replies] Last: http://en.wikipedia.org/wiki/Floating_point#Accuracy_problems Round e... (by ne555)
References
 
I was thinking, if references are implemented as pointers, why is there NO way to change the object it points to? I mean, I get that something as simple as this...
[6 replies] Last: From what I've read on this site, pointers and references produce exa... (by Disch)
detemine vtable address
 
Hi, I am understanding vtable concept and having some specific question.Can you provide me input. 1. Can we print vtable and its function. 2. Can we determ...
[3 replies] Last: adding little bit more info... 'how many vatable has been created" : ... (by agoswami)
Searching words for letters HlpPlx (1,2)
 
okay so im writing some code for this program that selects a random word based on which difficulty you choose. thats not important. what is supposed to happen i...
[27 replies] Last: As for your condition check. Consider this code. string answer =... (by Zaita)
Assembler and C++
 
So, when we realy should use assembler "insertions" instead of C or C++ code..?
[4 replies] Last: The meaning of the inline assembly ( asm("whatever") ) is implementa... (by Bazzy)
Getting Word Doc in program!!!
 
Okay for my final program for my C++ class we have to make a program of our own and i want to do a chose your own adventure but i have problems of how to get a ...
[5 replies] Last: Write it in word. Then save it as a basic .txt file without formatting... (by Zaita)
Easiest way to use SQL with C++ Programs?
 
Does anyone know how I could link up a c++ program with a database, and perform SQL queries on it? I've heard of people calling little scripts to do it. I'v...
[6 replies] Last: http://www.sqlite.org/index.html SQLite is pretty easy to get worki... (by Zaita)
Tools for "highlighting" C++ specific code / features?
 
Are there any tools out there that can look over a source file and tell you which parts of a file are C++ specific (as opposed to regular C)? Or would trying to...
[4 replies] Last: Compilation is your best bet :) (by Zaita)
Programs communication
 
Hello, I tried to write two programs that communicates with each other through fstreams directer to the same file. It works. But here comes a question - a...
[1 reply] : Google "Interprocess Communication" also known as IPC. And you'll find... (by Zaita)
fgets() print out a junked character in opening a file
 
i really don't want to use gets but i dont have any more ideas. i tried fgets() but it just print out a junked character. so i used gets. is there any more i ca...
[2 replies] Last: Could you rephrase your question? It's rather confusing. What, exactly... (by chrisname)
Loading a DLL
 
Hi I've seem to have hit a brick wall with dynamically loading things into my program, I want my program to find and include a file called "ScriptRetry" which i...
[no replies]
Accepting string characters with space using C I/O only.
 
As you can see, I am working on file handling right now. The only problem is with gets() function. Well, the codes were in cin and cout at first but then my pro...
[7 replies] Last: Wait... are you programming in C (and not C++)? Even so, you need ... (by Duthomhas)
December 2010 Pages: 1... 910111213... 24
  Archived months: [nov2010] [jan2011]

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