Beginners - March 2016 (Page 33)

Help with switching two values
 
I am not sure what I am doing wrong here. Any help would be greatly appreciated. The problem I'm trying to do is: Write a program that receives two numbers ...
[4 replies] Last: There is the std::swap library function. #include <algorithm> // ... (by AbstractionAnon)
How can I get my code to work with string instead of const char?
 
I've gotten my code to do what the assignment asks except without the proper function that the professor wants. I used a constant char to compare to strings as ...
[2 replies] Last: Well, the easiest way to do this with what you have is use std::string... (by AbstractionAnon)
by WhatIf
Where should I initialize member variables?
 
I'm still learning C++ and from time to time I write code to get better understanding of the language. What is causing me confusion is how to initialize variabl...
[1 reply] : You need to show some code that illustrates your question. If the vari... (by jlb)
C++ Assingment
 
Hello Everyone Please kindly assist I am new to programming and really have not found my head around the assignment is due on Monday and now I am in desperat...
[4 replies] Last: Yes it's mFactor, but it isn't constant. The instructions say "The qua... (by dhayden)
by thor36
Application built with makefile works fine, but same code built in IDE crashes
 
Greetings all, I used msys64 mingw32 (on Windows 7, 64 bit) to build a 3rd party library (https://sourceforge.net/p/libosmscout/code/ci/master/tree/) using a s...
[1 reply] : *Bump, if I may (by thor36)
help with a few windows.h functions ?
 
Hello, I came across this code: #include <windows.h> #include <iostream> #include <stdio.h> using namespace std; int main() { LARGE_INTEGER ...
[1 reply] : QueryPerformanceFrequency(): https://msdn.microsoft.com/en-us/library/... (by Computergeek01)
cin problem
 
Hello everyone. I am creating a simple program that creates a file, outputs the contents and then manipulates the data. All very basic. My problem is that for...
[no replies]
Help with getting system time.
 
Can someone tell me which function can be used to get the current system time in micro seconds??
[no replies]
Why does at() not return a reference to the element at position n in a vector<vector<pair<int,int> > >?
 
I have a vector<vector<pair<int,int> > > v1 with 9 vector<pair<int,int> > elements. When I use v1.at(7) I get not just one vector<pair<int,int> > element but 2....
[1 reply] : > You can see in the output see that the elements add up No, we can se... (by ne555)
locales and facets for build in types
 
Hi, so here is the problem. I wanted to create a facet to read numbers from console input so that those numbers could be both normal unsigned integers and roman...
[2 replies] Last: Tnx man this will definitely work! :) (by etrusks)
issorted program
 
My assignment is to " write the following function that returns true if the list is already sorted in increasing order: bool isSorted(const int , size) ...
[2 replies] Last: The logic has already been told by Arslan7041. To make it easier for y... (by hiphop12ism)
by iampig
Help with C++ homework
 
I am having trouble with my c++ homework. I cannot figure out how to write a program that reads a sequence of integer inputs and prints cumulative totals. A...
[1 reply] : Declare an integer with int i; you can read it with cin >> i; Plea... (by dhayden)
Database dependencies
 
Not sure where else to go, so ill post here. If anyone is familiar with databases or determinants at all, could you please help me with one of my class problems...
[4 replies] Last: If one patient can have many diagnoses and one diagnosis can belong to... (by Thomas1965)
class named main
 
Can I have a class named main in C++? Is this possible?? then how can i create objects.. #include<iostream.h> class main { public: int x; }; // upto t...
[5 replies] Last: You could place the main class inside a namespace. namespace A { cla... (by Peter87)
sum of specific elements in a vector
 
Is it possible to add specific elements of a vector? I am not sure as to how to go about doing this. below is an example of something i would like sum to achie...
[1 reply] : You can use a vector like an array: sum = arr + arr ; This adds t... (by coder777)
Calculating the totals
 
I am having trouble reading reading from a file. At the moment I'm not even sure that the rest of my 'if' statements are working since only the first one prints...
[2 replies] Last: I understand now, thank you so much for the help. I'm still a newbie u... (by JLop0820)
switch statement problem
 
ok heres my problem I have a menu that u have 4 options the 4 option is an exit and it works but I can press 1 and that works and 2 and 3 next and it works but ...
[1 reply] : Code would be good. Don't forget the code tags. Just guessing at the ... (by TheIdeasMan)
by ec252
Snake Game Making snake increase in size and and follow the same trail as lead character
 
Could anyone give me some ideas for an easy or at least somewhat simple way to accomplish this. I need a character to appear and to follow my 's'which is the he...
[no replies]
Pig Latin
 
Hi, I need help with my pig latin code. I know there's an answer to this on here already but I don't understand it. Also, I'm not allowed to use vectors; I have...
[no replies]
void functions && POINTER
 
How do I write what the output of a void function into a file if I cannot assign it a variable? Here is my code. This is the assignment. Write a program ...
[no replies]
March 2016 Pages: 1... 3132333435... 47
  Archived months: [feb2016] [apr2016]

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