General C++ Programming - March 2011

by Smitty
What am I missing?
 
By the way stdDevFns.h is a header file that I created. #include <iostream> #include <fstream> #include <cmath> #include "stdDevFns.h" using namespace...
[2 replies] Last: you are also missing a - main() - (by closed account zwA4jE8b)
Sending input to external device
 
I have two laptops, running linux. Each laptop supports at most 2 outputs (onboard monitor plus one external). I would like to use one of the laptops as a third...
[no replies]
Saving Classes
 
Hi, I'm wondering if there is an automated way to write instances of classes to a disk and read instances of classes from a disk. Does something like sizeof(in...
[5 replies] Last: There is no automated way. However, there is a methodology to this. Go... (by Duthomhas)
by badger
how to interpret string characters for if function (unit converter).
 
Hi, I'm really quite new to C++ but I'm trying to code a unit converter for a class assignment. I'm stuck on trying to read an empty space before a character w...
[2 replies] Last: Apologies, tags have now been added. There isn't a space in the strin... (by badger)
how do read the 1st line in text file?
 
Hi, Can someone tell me how do we read the first line in a text file? As far as I know,the code below will read the number of line that are present in th...
[8 replies] Last: I suggest the C++ Primer: http://www.amazon.com/Primer-4th-Stanley-B-L... (by Athar)
time counter problem
 
i want to design a clock in cpp. i'm a beginner. so far i did this, but it can't compile. does anyone else help me to get over the compile error? * sorry for...
[no replies]
SFML linking problem
 
I am trying to follow the tutorial on SFML's site and am having an issue when running the executable. I have 'sudo make install'd the lib, and am using the foll...
[11 replies] Last: @ darkestfright : I understand why you would say that, this was just ... (by Computergeek01)
problem number 1
 
well err?.. i don't like to ask for help with homeworks but i really don't know how to solve this problem.. At the new year's eve concert the first 2 rows ar...
[no replies]
How will the behaviour of multibyte char differ because of different LC_CTYPE locale
 
I am comparing two multibyte characters in two different platforms having different LC_CTYPE variables, they are returning different values. One of the varia...
[3 replies] Last: From the man page: NOTES The behavior of mbrlen() depends on t... (by PanGalactic)
data structure , doubly linked list . probelm
 
hi every one, sorry if I write this topic in wrong section :'( I have a problem with this code I dont know why is not compiling or show result !! this is ...
[3 replies] Last: Try this one. I think it will work (untested though): void DLL::spec... (by closed account D80DSL3A)
File mapping error
 
I'm trying to map a file to memory using mmap function, but whenever I set an offset I get an error!! I tried to google it but no use! could you guys help me wi...
[1 reply] : I found the solution. The offset has to be multiples of the system pag... (by TheDestroyer)
by Nay
Using cygwin, dev C++ and unix header files-- please help
 
Hello... I am really in desperate situation. I am a dev C++ programmer. I have never done programming in Unix or with cygwin before. Now I have to use C++ heade...
[1 reply] : I believe that you can use "\\" to use the forward slash in an include... (by ModShop)
by mincuu
how do I 'find' and 'delete' texts from a text file??
 
i have this assignment to submit tomorrow(friday) and i am having difficulties updating my text files. actually, i have to be able to update the text files by s...
[no replies]
Dynamic aspect to string in C++
 
Hi Guys, Im an automation engineer, first time attempt at a C++ app. Im writing an app that connects with manufacturing software, reads tag data from a PLC, ...
[no replies]
Test Question.
 
Using C++ Create a program that enables the creation of student objects. The objects should contain two data members that store values for student name and fee...
[2 replies] Last: No need to apologise, i understand. Thanks for pointing & showing me t... (by jmambwere)
OpenGL-Random Walk Program
 
I'm writing a program for my C++ class. Here's the description: Random Walk Random walk simulates how a molecule moves in a liquid or how a drunk person st...
[2 replies] Last: lol nah jk. its Dan (by CSAS)
Something about iterator base class in STL
 
I browsed one of the pages in the reference column and find the definition of base_iterator class template like following: template <class Category, class T, c...
[1 reply] : See http://cplusplus.com/reference/clibrary/cstddef/ptrdiff_t/ As fo... (by firedraco)
Found something weird in old code.
 
In some of my old code, I found a function for converting unsigned integers to roman numerals. It contains some rather ... unorthodox control flow. const char...
[1 reply] : I think it is legal. Case 4 doesn't have a break statement, meaning i... (by webJose)
sha256 encryption
 
i have a sha256 encryption for passwords on my game and i found that i cant make a password recovery option on my games site that uses email and account name ca...
[2 replies] Last: I would avoid the trouble of storing the password using reversible enc... (by webJose)
How can I add input to a string array?
 
How do I add to a list of existing values, in the input stream, to a string array?
[1 reply] : you can use getline function in C++ <string> header file: the function... (by zixuandeneidan)
March 2011 Pages: 123... 31
  Archived months: [feb2011] [apr2011]

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