Beginners - August 2013 (Page 25)

how to search for a string in a vector of structs
 
I have a vector of structs. I need to find the index of a specific struct in a vector by using the date_time string stored in that particular struct. the onl...
[3 replies] Last: managed to get it to work with boost::bind #include <vector> #includ... (by rafae11)
Money Breakage
 
Alrite, how do break money down using c++ eg:the user enters a value, and then the program breaks it up for this example $20.20 to be broken down to how many,...
[2 replies] Last: Its called typing in short hand......duhhh Thanks, may your life be bl... (by willynilly)
by prez
Use of data files in cpp
 
I have the challenge of compiling data file in c plus plus. The code has refused to compile and also create the other files which are the input and output files...
[1 reply] : Help you with what? You haven't provided any information. Please... (by AbstractionAnon)
Problem Using ifstream; Strange Characters Appearing
 
Hello, I am trying to read a file containing two lines of text, like such: UserName HOST\Owner The text was written to a text file named "CompNames.txt" by a...
[3 replies] Last: Thank you Cubbi. I never considered the files encoding as the problem... (by Wait What)
Classes and Vectors
 
I am in need of assistance with a homework assignment where I have to write a program that prints out a bank statement .The program input is a sequence of trans...
[no replies]
Displaying invalid entry...
 
I need to display "invalid entry" if the user puts a character instead of an integer. I cant find a way to do that correctly. Sorry, im a beginner, lol. and ...
[2 replies] Last: Thank you, sir! :) Btw, where should i put that? I am really a noob (by bits12345)
sockaddr_in& what does the & mean?
 
The code is a declaration but I want to know what it means to put & right after the type. sockaddr_in& GetAddress();
[1 reply] : It's declaring a reference return type (a reference to a sockaddr_in) ... (by andywestken)
error -1.#IND00 in vc++2010
 
hello; I tried to write a function that calculates the harmonic average as follows: long double Harmonique(long double *t,int l) { long double s=0.0...
[2 replies] Last: Here, I found the solution. the * t I used in "main" was of type int, ... (by yahya77)
i am unable to fix the error 'expected primary exp before public in my program
 
how do i fix the errors expected primary expression before public and also expected '}'before else error pls help # include<iostream> #include...
[1 reply] : What is "public:" doing on line 211? Did you bother to look at the li... (by cire)
Length of strings
 
I need to know when I call std::string::length() and strlen(char*) on "hi" and they both output 2 does that start at 0 and really mean 3 because the null termin...
[6 replies] Last: tbere is std::string.size(). It works very well and is obvious to use.... (by Superdude)
Help with errors...
 
I am getting this when I try to compile. Will post below. #ifndef INT_LINKED_LIST #define INT_LINKED_LIST class IntSLLNode { public: IntSLLNode...
[3 replies] Last: First of all the compiler did not find header "intSLList.h" So all oth... (by vlad from moscow)
Keylogger Code Malfunctioning
 
Hi everyone! So I just started writing code tonight, using Youtube to help me learn, and one of the easier codes i came across was a Keylogger, so i decided to ...
[7 replies] Last: I hope this article of mine might be of help to you http://www.codepro... (by haephrati)
"no matching function for call to" error
 
Hello, I'm new to this forum and still pretty new to programming in general. I'm using C++ and Qt, trying to design a GUI app as an exercise. I'm encountering ...
[6 replies] Last: Yes, my bad, I was passing pointers without really realizing. I ended... (by Cykyrios)
by sansoo
displaying an array with some loops
 
hello, I don't know what I'm doing wrong here, but it must be some obvious stupid mistake, I am trying to learn how to use arrays and made this very simple prog...
[3 replies] Last: You're welcome. (by MikeyBoy)
by matt11
Need some help
 
Hello everyone i need some help figuring this out. My question is asking me Write a program that creates an array of 100 string objects. Fill the array by ...
[11 replies] Last: no. he clearly said fill the array until the array is filled. (by Manga)
gets() and writing into file
 
Ive got a problem in the following code cout<<"\n Current items in Consoles: \n"; viewConsoles(); cout<<"\n \t Enter de...
[5 replies] Last: There are two getlines, one for c-strings and one for std::string: c-... (by Lowest0ne)
MVC-pattern book
 
Hello! I would like to write a gui using the MVC architecture. Could someone recommend me a book/chapter from a book where this topic is considered in deta...
[no replies]
by AbR
Destuctors and allocated memory
 
main.cpp #include <iostream> #include <vector> #include "class_dish.h" #include "class_dish_data.h" int main() { std::vector<Dish> Common; createCom...
[7 replies] Last: Thank you (by AbR)
Linker Errors
 
I am using Dev C++ and I get linker errors for playgame, loadgame and playmultiplayer, I am copying the code from a tutors hand out, I have checked and triple c...
[2 replies] Last: The errors are as follows: [Linker error] undefined reference to `p... (by JohnC1000)
how to cin without repeating the statement.
 
note: i can only use <iostream> what i need to do is to input a value and if it's false then i will need to input another value again in the same statement wit...
[5 replies] Last: sorry ive seen the output wrong..problem solved with system("CLS"); ... (by fujin009)
August 2013 Pages: 1... 2324252627... 51
  Archived months: [jul2013] [sep2013]

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